diff --git a/.config/fish/functions/makeaway.fish b/.config/fish/functions/makeaway.fish index 059322c..3f607cb 100644 --- a/.config/fish/functions/makeaway.fish +++ b/.config/fish/functions/makeaway.fish @@ -9,8 +9,8 @@ function makeaway end # Check if directory exists - set directory $argv[1] - if not test -d $directory + set directory "$argv[1]" + if not test -d "$directory" echo "Directory doesn't exists." 1>&2 return 1 end @@ -27,7 +27,7 @@ function makeaway end # Make - cd $directory + cd "$directory" make $target cd - end diff --git a/.config/fish/functions/ssh-export.fish b/.config/fish/functions/ssh-export.fish index 9cd88a0..f68028e 100644 --- a/.config/fish/functions/ssh-export.fish +++ b/.config/fish/functions/ssh-export.fish @@ -1,11 +1,11 @@ function ssh-export # Save the entry directory - set entry_directory $PWD + set entry_directory "$PWD" # Create the archive - cd $HOME/.ssh - tar cz --exclude='known_hosts*' -X environment -f '$HOME/SSH.tar.gz' * + cd "$HOME/.ssh" + tar cz --exclude='known_hosts*' -X environment -f "$HOME/SSH.tar.gz" * # Returns to the entry directory - cd $entry_directory + cd "$entry_directory" end