mirror of
https://github.com/jimeh/dotify.git
synced 2026-02-19 10:06:39 +00:00
Expand Dotfile syntax support to not require a <source> argument
Supported action syntax: - `<action>: <source> -> <target>` - `<action>: -> <target>` - `<source> -> <target>` - `-> <target>`
This commit is contained in:
@@ -39,6 +39,15 @@ dotify-action link ackrc .ackrc
|
||||
dotify-action link gitconfig \".gitconfig\""
|
||||
|
||||
|
||||
# Compiles standard actions without a <source>
|
||||
echo -e "root_link .dotfiles
|
||||
link: -> .ackrc
|
||||
link:-> \".gitconfig\"" > $dotfile
|
||||
assert "compile-dotfile $dotfile" "root_link .dotfiles
|
||||
dotify-action link .ackrc
|
||||
dotify-action link \".gitconfig\""
|
||||
|
||||
|
||||
# Compiles default (shorthand) actions
|
||||
echo -e "root_link .dotfiles
|
||||
link: ackrc -> .ackrc
|
||||
@@ -48,6 +57,15 @@ dotify-action link ackrc .ackrc
|
||||
dotify-action default gitconfig \".gitconfig\""
|
||||
|
||||
|
||||
# Compiles default (shorthand) actions without a <source>
|
||||
echo -e "root_link .dotfiles
|
||||
-> .ackrc
|
||||
-> \".gitconfig\"" > $dotfile
|
||||
assert "compile-dotfile $dotfile" "root_link .dotfiles
|
||||
dotify-action default .ackrc
|
||||
dotify-action default \".gitconfig\""
|
||||
|
||||
|
||||
# Correctly indents actions
|
||||
echo -e "root_link .dotfiles
|
||||
if [ true ]; then
|
||||
|
||||
Reference in New Issue
Block a user