* PATCH: 4.0.2 - bugs in completion functions
@ 2001-08-06 15:16 Oliver Kiddle
0 siblings, 0 replies; only message in thread
From: Oliver Kiddle @ 2001-08-06 15:16 UTC (permalink / raw)
To: zsh-workers
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*)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-08-06 15:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-06 15:16 PATCH: 4.0.2 - bugs in completion functions Oliver Kiddle
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).