Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#454990: zsh: should complete user names for 'id'
- X-seq: zsh-workers 24188
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#454990: zsh: should complete user names for 'id'
- Date: Sat, 8 Dec 2007 11:46:34 -0500
- Cc: marcelm@xxxxxxxx, 454990@xxxxxxxxxxxxxxx
- In-reply-to: <20071208155647.24989.59211.reportbug@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx, marcelm@xxxxxxxx, 454990@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20071208155647.24989.59211.reportbug@xxxxxxxxxxxxxxxxxxxxxxx>
On Sat, Dec 08, 2007 at 04:56:47PM +0100, Marcel Moreaux wrote:
> zsh should complete user names for the 'id' command, just like it does
> for passwd, userdel, etc.
>
> This should be trivially accomplished by adding 'id' to
> /usr/share/zsh/4.3.2/functions/Completion/Unix/_users .
Index: Completion/Unix/Command/_id
===================================================================
RCS file: Completion/Unix/Command/_id
diff -N Completion/Unix/Command/_id
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ Completion/Unix/Command/_id 8 Dec 2007 16:45:06 -0000
@@ -0,0 +1,13 @@
+#compdef id
+
+_arguments \
+ '-a[no-op]' \
+ '(-Z --context)'{-Z,--context}'[print only context]' \
+ '(-g --group)'{-g,--group}'[print only EGID]' \
+ '(-G --groups)'{-G,--groups}'[print all GIDs]' \
+ '(-n --name)'{-n,--name}'[print name instead of number]' \
+ '(-r --real)'{-r,--real}'[print real ID instead of effective]' \
+ '(-u --user)'{-u,--user}'[print only EUID]' \
+ '--help[display help]' \
+ '--version[display version]' \
+ ':user:_users'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author