From: Oliver Kiddle <opk@u.genie.co.uk>
To: zsh-workers@sunsite.dk
Subject: PATCH: 4.0.2 - bugs in completion functions
Date: Mon, 06 Aug 2001 16:16:35 +0100 [thread overview]
Message-ID: <3B6EB4D3.54453D2B@u.genie.co.uk> (raw)
In making those last changes, I came across a couple of bugs so I'm fixing
them for the stable branch.
_grep was excluding -e, -f, --regexp and --file from being used in
combination or multiply. Also, offering `pattern' prevented long
options completing so I've used _guard.
_loadkeys should allow multiple -v options
Oliver
Index: Completion/Unix/Command/_grep
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_grep,v
retrieving revision 1.1
diff -u -r1.1 _grep
--- Completion/Unix/Command/_grep 2001/04/02 11:52:20 1.1
+++ Completion/Unix/Command/_grep 2001/08/06 15:09:17
@@ -27,9 +27,9 @@
fi
arguments=( \
- '(-e --regexp -f --file)1:pattern:' \
- {'(--regexp -f --file 1)-e+[regexp]','(-e -f --file 1)--regexp='}':regexp:' \
- {'(--file -e --regexp 1)-f+[file]','(-f -e --regexp 1)--file='}':pattern file:_files' \
+ '(-e --regexp -f --file)1:pattern:_guard "^--*"' \
+ '(1)*'{'-e+[regexp]',--regexp=}':pattern' \
+ '(1)*'{'-f+[file]',--file=}':pattern file:_files' \
\
'*:files:_files' \
\
@@ -51,7 +51,7 @@
'(--binary-files)-I[ignore binary]' \
'(--ignore-case)-i[ignore case]' '(-i)--ignore-case' \
'(--files-without-match)-L[files without match]' '(-L)--files-without-match' \
- '(--file-with-matches)-l[files with matches]' '(-l)--files-with-matches' \
+ '(--files-with-matches -l)'{'-l[files with matches]',--files-with-matches} \
'--mmap' \
'(--line-number)-n[line number]' '(-n)--line-number' \
'(--quiet --silent)-q[quiet]' '(-q --quiet)--silent' '(-q --silent)--quiet' \
@@ -66,7 +66,6 @@
# remove long options?
[[ -z "$_is_gnu[$words[1]]" ]] &&
- arguments=( ${${${${arguments:#*\)--*}:#--*}//--[^ )]#/}/\( #\)/} )
+ arguments=( ${arguments:#(|*\)(\*|))--*} )
_arguments -s $arguments
-
Index: Completion/Unix/Command/_loadkeys
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_loadkeys,v
retrieving revision 1.3
diff -u -r1.3 _loadkeys
--- Completion/Unix/Command/_loadkeys 2001/05/03 13:05:49 1.3
+++ Completion/Unix/Command/_loadkeys 2001/08/06 15:09:17
@@ -13,8 +13,8 @@
'(-m)--mktable' \
'(--clearstrings)-s[clearstrings]' \
'(-s)--clearstrings' \
- '(--verbose)-v[verbose]' \
- '(-v)--verbose' \
+ '*-v[verbose]' \
+ '*--verbose' \
':keymap:_files -W /usr/share/keymaps'
;;
solaris*)
reply other threads:[~2001-08-06 15:17 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=3B6EB4D3.54453D2B@u.genie.co.uk \
--to=opk@u.genie.co.uk \
--cc=zsh-workers@sunsite.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).