mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-29 00:21:14 -03:00
9 lines
377 B
Fish
9 lines
377 B
Fish
# localization: skip(private)
|
|
function __fish_complete_group_ids --description "Complete group IDs with group name as description"
|
|
if command -sq getent
|
|
getent group | string replace -f -r '^([[:alpha:]_][^:]*):[^:]*:(\d+).*' '$2\t$1'
|
|
else if test -r /etc/group
|
|
string replace -f -r '^([[:alpha:]_][^:]*):[^:]*:(\d+).*' '$2\t$1' </etc/group
|
|
end
|
|
end
|