diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-04 08:07:24 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-04 08:07:24 +0000 |
commit | 41404fb6c723ce4544de1b216df37c9da5119f59 (patch) | |
tree | 55b02b09c0fd3a45e3f213c0b48a5413ccf98d09 /Completion/Core/_path_files | |
parent | 715278d0631c1a165d2b9aae8e3650e1d7c2ad02 (diff) | |
download | zsh-41404fb6c723ce4544de1b216df37c9da5119f59.tar.gz zsh-41404fb6c723ce4544de1b216df37c9da5119f59.tar.xz zsh-41404fb6c723ce4544de1b216df37c9da5119f59.zip |
add some $(print...)s because of possible math-parse errors (12156)
Diffstat (limited to 'Completion/Core/_path_files')
-rw-r--r-- | Completion/Core/_path_files | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index 48e9dd299..d2de3f230 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -247,10 +247,9 @@ elif [[ "$pre" = *\$*/* && "$compstate[quote]" != \" ]]; then # after the first slash after the parameter expansion. # This fails for things like `f/$foo/b/<TAB>' where the first `f' is # meant as a partial path. - linepath="${(M)pre##*\$[^/]##/}" - realpath=${(e)~linepath} - [[ "$realpath" = "$linepath" ]] && return 1 + realpath=$(print -r ${(e)~linepath}) 2>/dev/null + [[ -z "$realpath" || "$realpath" = "$linepath" ]] && return 1 pre="${pre#${linepath}}" i="${#linepath//[^\\/]}" orig="${orig[1,(in:i:)/][1,-2]}" |