mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 00:50:37 +08:00
9 lines
258 B
Fish
9 lines
258 B
Fish
|
|
function __fish_complete_groups --description "Print a list of local groups, with group members as the description"
|
|
if test -x /usr/bin/getent
|
|
getent group | cut -d ':' -f 1,4 | sed 's/:/\t/'
|
|
else
|
|
cut -d ':' -f 1,4 /etc/group | sed 's/:/\t/'
|
|
end
|
|
end
|