From 6c1fb551ba0973c9a86e1ea479d553d66c6bf6b7 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:24:09 +0000 Subject: zsh-3.1.5-pws-14 --- Completion/Core/_sep_parts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Core/_sep_parts') diff --git a/Completion/Core/_sep_parts b/Completion/Core/_sep_parts index c1cda2b9a..fc927163b 100644 --- a/Completion/Core/_sep_parts +++ b/Completion/Core/_sep_parts @@ -101,6 +101,8 @@ if [[ $# -le 1 || "$str" != *${2}* ]]; then _match_pattern _sep_parts test matchflags [[ -n "$_comp_correct" ]] && matchflags="$matchflags(#a$_comp_correct)" + [[ "${compstate[pattern_match]-*}" != \** ]] && test="$test:gs/*//" + test="${matchflags}${test}" testarr=( "${(@M)${(@P)arr}:#${~test}*}" ) testarr=( "${(@)testarr:#}" ) @@ -131,6 +133,9 @@ while [[ $# -gt 0 && "$str" == *${1}* ]]; do matchflags="" _match_pattern _sep_parts test matchflags [[ -n "$_comp_correct" ]] && matchflags="$matchflags(#a$_comp_correct)" + + [[ "${compstate[pattern_match]-*}" != \** ]] && test="$test:gs/*//" + test="${matchflags}${test}" # We incrementally add suffixes by appending to them the seperators @@ -163,7 +168,7 @@ done # Add the matches for each of the suffixes. for i in "$suffixes[@]"; do compadd -U "$group[@]" "$expl[@]" "$matchers[@]" "$autosuffix[@]" \ - -i "$IPREFIX" -p "$prefix" -s "$i" - "$testarr[@]" + -i "$IPREFIX" -I "$ISUFFIX" -p "$prefix" -s "$i" - "$testarr[@]" done # This sets the return value to indicate that we added matches (or not). -- cgit 1.4.1