mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
9367d4ff71
This does not include checks/function.fish because that currently includes a "; end" in a message that indent would remove, breaking the test.
7 lines
345 B
Fish
7 lines
345 B
Fish
function __fish_complete_user_ids --description "Complete user IDs with user name as description"
|
|
if command -sq getent
|
|
getent passwd | string replace -f -r '^([[:alpha:]][^:]*):[^:]*:(\d+).*' '$2\t$1'
|
|
else if test -r /etc/passwd
|
|
string replace -f -r '^([[:alpha:]][^:]*):[^:]*:(\d+).*' '$2\t$1' </etc/passwd
|
|
end
|
|
end
|