mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-05 18:07:07 +08:00
13 lines
389 B
Fish
13 lines
389 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 | while read -l line
|
|
string split -f 1,4 : -- $line | string join \t
|
|
end
|
|
else
|
|
while read -l line
|
|
string split -f 1,4 : -- $line | string join \t
|
|
end </etc/group
|
|
end
|
|
end
|