From: Tanaka Akira <akr@jaist.ac.jp>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: _regex_arguments and _apt
Date: 16 Oct 1999 00:07:22 +0900 [thread overview]
Message-ID: <rsqln94r7bp.fsf@crane.jaist.ac.jp> (raw)
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
reply other threads:[~1999-10-15 15:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rsqln94r7bp.fsf@crane.jaist.ac.jp \
--to=akr@jaist.ac.jp \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).