diff --git a/share/functions/__fish_complete_cd.fish b/share/functions/__fish_complete_cd.fish index dbc7f766b..5e5198350 100644 --- a/share/functions/__fish_complete_cd.fish +++ b/share/functions/__fish_complete_cd.fish @@ -18,9 +18,9 @@ function __fish_complete_cd -d "Completions for the cd command" end - if echo (commandline -ct)|sgrep '^/\|^\./\|^\.\./' >/dev/null + if echo '(commandline -ct)'|sgrep '^/\|^\./\|^\.\./' >/dev/null # This is an absolute search path - eval printf '\%s\\tDirectory\\n' (commandline -ct)\*/ + eval printf '\%s\\tDirectory\\n' '(commandline -ct)'\*/ else # This is a relative search path # Iterate over every directory in CDPATH @@ -33,7 +33,7 @@ function __fish_complete_cd -d "Completions for the cd command" builtin cd $wd eval builtin cd $i - eval printf '"%s\tDirectory in "'$i'"\n"' (commandline -ct)\*/ + eval printf '"%s\tDirectory in "'$i'"\n"' '(commandline -ct)'\*/ end end