* PATCH: _regex_arguments and _apt
@ 1999-10-15 15:07 Tanaka Akira
0 siblings, 0 replies; only message in thread
From: Tanaka Akira @ 1999-10-15 15:07 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-10-15 15:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-15 15:07 PATCH: _regex_arguments and _apt Tanaka Akira
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).