diff options
Diffstat (limited to 'Completion/Base')
-rw-r--r-- | Completion/Base/_regex_arguments | 7 |
1 files changed, 3 insertions, 4 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 - \ |