From 7891a9054f1208f13ca0a0dd91b0264e1e9dd25a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 8 Oct 2023 19:43:22 +0200 Subject: [PATCH] fix paths --- .config/fish/functions/makeaway.fish | 6 +++--- .config/fish/functions/ssh-export.fish | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) 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