diff options
Diffstat (limited to 'plugins/fastfile/fastfile.plugin.zsh')
-rw-r--r-- | plugins/fastfile/fastfile.plugin.zsh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/fastfile/fastfile.plugin.zsh b/plugins/fastfile/fastfile.plugin.zsh index 6288bb275..896fed5f7 100644 --- a/plugins/fastfile/fastfile.plugin.zsh +++ b/plugins/fastfile/fastfile.plugin.zsh @@ -44,7 +44,7 @@ function fastfile() { # The path to the shortcut file # function fastfile_resolv() { - echo "${fastfile_dir}${1}" + echo "${fastfile_dir}/${1}" } # @@ -78,9 +78,9 @@ function fastfile_print() { # (=> fastfile_print) for each shortcut # function fastfile_ls() { - for f in "${fastfile_dir}"/*(NF); do - file=`basename "$f"` # To enable simpler handling of spaces in file names - varkey=`echo "$file" | tr " " "_"` + for f in "${fastfile_dir}"/*(N); do + file=$(basename "$f") # To enable simpler handling of spaces in file names + varkey=$(echo "$file" | tr " " "_") # Special format for columns echo "${fastfile_var_prefix}${varkey}|->|$(fastfile_get "$file")" @@ -98,15 +98,16 @@ function fastfile_ls() { function fastfile_rm() { fastfile_print "$1" rm "$(fastfile_resolv "$1")" + unalias "${fastfile_var_prefix}${1}" } # # Generate the aliases for the shortcuts # function fastfile_sync() { - for f in "${fastfile_dir}"/*(NF); do - file=`basename "$f"` # To enable simpler handling of spaces in file names - varkey=`echo "$file" | tr " " "_"` + for f in "${fastfile_dir}"/*(N); do + file=$(basename "$f") # To enable simpler handling of spaces in file names + varkey=$(echo "$file" | tr " " "_") alias -g "${fastfile_var_prefix}${varkey}"="'$(fastfile_get "$file")'" done |