From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3452 invoked from network); 6 Aug 2001 15:17:45 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Aug 2001 15:17:45 -0000 Received: (qmail 13416 invoked by alias); 6 Aug 2001 15:17:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15577 Received: (qmail 13404 invoked from network); 6 Aug 2001 15:17:34 -0000 Sender: kiddleo Message-ID: <3B6EB4D3.54453D2B@u.genie.co.uk> Date: Mon, 06 Aug 2001 16:16:35 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: zsh-workers@sunsite.dk Subject: PATCH: 4.0.2 - bugs in completion functions Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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*)