add the functions needed for some keybindings
[zsh.git] / .zsh / functions / grpname
1 # -*- mode:sh -*-
2
3 # This little function just returns the name of a unix group for the
4 # given gid
5 # 3 ways to do it, all work. select what you prefer :)
6 # ${(j.:u:.)${(f)"$(getent group $1)"}%%:*}
7 # ${${(s.:.)"$(getent group $1)"}[0]}
8 echo ${"$(getent group $1)"%%:*}
9
10