about summary refs log tree commit diff
path: root/Completion/Core/_path_files
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-04 08:07:24 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-07-04 08:07:24 +0000
commit41404fb6c723ce4544de1b216df37c9da5119f59 (patch)
tree55b02b09c0fd3a45e3f213c0b48a5413ccf98d09 /Completion/Core/_path_files
parent715278d0631c1a165d2b9aae8e3650e1d7c2ad02 (diff)
downloadzsh-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_files5
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]}"