diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Base/_regex_arguments | 7 | ||||
-rw-r--r-- | Completion/Debian/_apt | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Completion/Base/_regex_arguments b/Completion/Base/_regex_arguments index a89bb19b4..2608fda11 100644 --- a/Completion/Base/_regex_arguments +++ b/Completion/Base/_regex_arguments @@ -88,8 +88,6 @@ _ra_parse_elt () { if [[ $index -le $#regex && $regex[index] = :* ]]; then act="${regex[index++][2,-1]}" action[$state]="$act" - # `actions[$act]="${actions[$act]} $state"' is not work properly - # because $act on lhs is expanded twice. : ${actions[$act]::="${actions[$act]} $state"} else action[$state]="" @@ -235,8 +233,9 @@ _ra_gen_func () { 'case "$_ra_actions[1]" in' for tmp in "${(@k)actions}"; do - #print -lr - "KEY:{$tmp}" "VAL:{$actions[$tmp]}" >&2 - print -lr - "${(j:);&:)${=actions[$tmp]}})" $tmp ';;' + if [[ "$tmp" != '' ]]; then + print -lr - "${(j:);&:)${=actions[$tmp]}})" $tmp ';;' + fi done print -lr - \ diff --git a/Completion/Debian/_apt b/Completion/Debian/_apt index 503d42a56..e4593d54e 100644 --- a/Completion/Debian/_apt +++ b/Completion/Debian/_apt @@ -284,7 +284,7 @@ _describe -o option tmp2 -- tmp3 -S=' regex_long_prefix=("$regex_long_prefix[@]" /"(${(j:|:)long_arbitem})$nul"/ -'_apt_consume_long ${match[1]%'$qnul'}' - /"$word"/ :"$comp_arbitem"/ \| + /"$word"/ :"$comp_arbitem" \| /"(${(j:|:)long_arbitem})="/ -'_apt_consume_long ${match[1]%=}' \( /"$word1"/ :"$comp_arbitem" \| /"$nul"/ /"$word"/ :"$comp_arbitem" \) \| |