Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: No completion of nice commands



Jörg Sommer <joerg@xxxxxxxxxxxx> wrote:
> the completion for commands they are passed as argument to nice does not
> work if nice gets itself an argument.
> 
> % nice ls --<TAB>
> <List of possible options>
> % nice -n4 ls --<TAB>
> <nothing>

It works with "nice -n 4 ls --", but the case where the 4 is in the
same word as the -n isn't handled.

Index: Completion/Unix/Command/_nice
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_nice,v
retrieving revision 1.1
diff -u -r1.1 _nice
--- Completion/Unix/Command/_nice	9 Jul 2003 14:06:20 -0000	1.1
+++ Completion/Unix/Command/_nice	22 Mar 2007 10:29:00 -0000
@@ -3,7 +3,7 @@
 shift words
 (( CURRENT-- ))
 
-if [[ $CURRENT -gt 1 && $words[1] = [-+](-|)<-> ]]; then
+if [[ $CURRENT -gt 1 && $words[1] = ([-+](-|)|-n)<-> ]]; then
     shift words
     (( CURRENT -- ))
 elif [[ $CURRENT -gt 2 && $words[1] = -n ]]; then


-- 


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview



Messages sorted by: Reverse Date, Date, Thread, Author