Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _regex_arguments and _apt
- X-seq: zsh-workers 8289
- From: Tanaka Akira <akr@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: _regex_arguments and _apt
- Date: 16 Oct 1999 00:07:22 +0900
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I modified _regex_arguments and _apt.
* Fix typo.
* Remove obsolete comments.
* Don't produce a case branch which has no code.
Index: Completion/Base/_regex_arguments
===================================================================
RCS file: /projects/zsh/zsh/Completion/Base/_regex_arguments,v
retrieving revision 1.1.1.5
diff -u -F^( -r1.1.1.5 _regex_arguments
--- Completion/Base/_regex_arguments 1999/09/25 11:12:08 1.1.1.5
+++ Completion/Base/_regex_arguments 1999/10/15 15:03:47
@@ -88,8 +88,6 @@
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 @@
'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 - \
Index: Completion/Debian/_apt
===================================================================
RCS file: /projects/zsh/zsh/Completion/Debian/_apt,v
retrieving revision 1.1.1.8
diff -u -F^( -r1.1.1.8 _apt
--- Completion/Debian/_apt 1999/09/25 11:12:10 1.1.1.8
+++ Completion/Debian/_apt 1999/10/15 15:03:47
@@ -284,7 +284,7 @@
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" \) \|
--
Tanaka Akira
Messages sorted by:
Reverse Date,
Date,
Thread,
Author