From eeebe3e4ec8365c038aa6186036f303a3caebe2b Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Tue, 6 Mar 2001 07:47:26 +0000 Subject: 13544, 13568 (Peter): + syntax for matchers in matcher-list to augment previous list --- Completion/Core/_main_complete | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Completion/Core/_main_complete') diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index f86593cb7..69ee24ae2 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -25,8 +25,8 @@ setopt localtraps noerrexit ; trap - ZERR local func funcs ret=1 tmp _compskip format nm call match min max i num\ _completers _completer _completer_num curtag _comp_force_list \ - _matchers _matcher _matcher_num _comp_tags _comp_mesg mesg str \ - context state line opt_args val_args curcontext="$curcontext" \ + _matchers _matcher _c_matcher _matcher_num _comp_tags _comp_mesg \ + mesg str context state line opt_args val_args curcontext="$curcontext" \ _last_nmatches=-1 _last_menu_style _def_menu_style _menu_style sel \ _saved_exact="${compstate[exact]}" \ _saved_lastprompt="${compstate[last_prompt]}" \ @@ -143,7 +143,14 @@ for tmp in "$_completers[@]"; do _matchers=( '' ) _matcher_num=1 - for _matcher in "$_matchers[@]"; do + _matcher='' + for _c_matcher in "$_matchers[@]"; do + if [[ "$_c_matcher" == +* ]]; then + _matcher="$_matcher $_c_matcher[2,-1]" + else + _matcher="$_c_matcher" + fi + _comp_mesg= if [[ -n "$call" ]]; then if "${(@)argv[3,-1]}"; then -- cgit 1.4.1