From 6cf46b1a997212aee8f6550ccb3251a1ff6b43c0 Mon Sep 17 00:00:00 2001 From: detailyang Date: Sun, 10 Apr 2016 02:04:11 +0800 Subject: [PATCH] wrap variable with double quotes for robustness --- functions/__fisher_plugin_fetch.fish | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functions/__fisher_plugin_fetch.fish b/functions/__fisher_plugin_fetch.fish index 0263546..3b2b569 100644 --- a/functions/__fisher_plugin_fetch.fish +++ b/functions/__fisher_plugin_fetch.fish @@ -10,7 +10,7 @@ function -S __fisher_plugin_fetch end debug "validate ok %s" "$item" - + if contains -- "$item" $enabled if test -z "$option" set skipped $skipped "$item" @@ -71,9 +71,9 @@ function -S __fisher_plugin_fetch printf "%s\n" "$name" debug "plugin %s" "$name" - if test ! -e $path - if test -L $path - set -l realpath (command readlink $path) + if test ! -e "$path" + if test -L "$path" + set -l realpath (command readlink "$path") if __fisher_file_remove "$realpath" "$fisher_file" debug "fishfile remove broken link %s ok" "$realpath" else