mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-18 12:33:38 +08:00
0a8c922d92
This option has been available for a while now and it's a bit shorter.
9 lines
274 B
Fish
9 lines
274 B
Fish
|
|
function __fish_complete_groups --description "Print a list of local groups, with group members as the description"
|
|
if command -sq getent
|
|
getent group | cut -d ':' -f 1,4 | sed 's/:/\t/'
|
|
else
|
|
cut -d ':' -f 1,4 /etc/group | sed 's/:/\t/'
|
|
end
|
|
end
|