From 28bd1b02cfbb1f06dfbccfe7c4e2e935666ee209 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 27 Apr 2004 17:00:11 +0000 Subject: 19839, 19842: improve handling of #q in qualifiers --- Completion/Unix/Type/_path_files | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Type/_path_files') diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files index fc8edca02..aae248bf5 100644 --- a/Completion/Unix/Type/_path_files +++ b/Completion/Unix/Type/_path_files @@ -120,7 +120,9 @@ if zstyle -s ":completion:${curcontext}:" file-sort tmp1; then tmp2=() for tmp1 in "$pats[@]"; do - if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then + if [[ "$tmp1" = (#b)(*[^\$])"(#q"(*)")" ]]; then + tmp2=( "$tmp2[@]" "${match[1]}(#q${sort}${match[2]})" ) + elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then tmp2=( "$tmp2[@]" "${match[1]}((${sort}${match[2][3,-1]}" ) elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then tmp2=( "$tmp2[@]" "${match[1]}(${sort}${match[2][2,-1]}" ) @@ -168,7 +170,9 @@ if [[ -n "$compstate[pattern_match]" && fi tmp2=() for tmp1 in "$pats[@]"; do - if [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then + if [[ "$tmp1" = (#b)(*[^\$])"(#q"(*)")" ]]; then + tmp2=( "$tmp2[@]" "${match[1]}(#q${tmp3}${match[2]})" ) + elif [[ "$tmp1" = (#b)(*[^\$])(\(\([^\|~]##\)\)) ]]; then tmp2=( "$tmp2[@]" "${match[1]}((${tmp3}${match[2][3,-1]}" ) elif [[ "$tmp1" = (#b)(*[^\$])(\([^\|~]##\)) ]]; then tmp2=( "$tmp2[@]" "${match[1]}(${tmp3}${match[2][2,-1]}" ) -- cgit 1.4.1