From 41404fb6c723ce4544de1b216df37c9da5119f59 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 4 Jul 2000 08:07:24 +0000 Subject: add some $(print...)s because of possible math-parse errors (12156) --- Completion/Core/_path_files | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Completion/Core/_path_files') 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/' 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]}" -- cgit 1.4.1