Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: 4.0.2 - bugs in completion functions
- X-seq: zsh-workers 15577
- From: Oliver Kiddle <opk@xxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: 4.0.2 - bugs in completion functions
- Date: Mon, 06 Aug 2001 16:16:35 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Sender: kiddleo
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*)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author