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

Re: Bug#454990: zsh: should complete user names for 'id'



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