2
0
Fork 0
mirror of https://github.com/fish-shell/fish-shell synced 2025-01-24 10:45:08 +00:00
fish-shell/share/functions/__fish_complete_users.fish
axel 4f54da3795 Fix user completion so it can handle comments in the passwd file. Patch by Sven Axelsson.
darcs-hash:20090201221921-ac50b-ef0883afe4dc68b43c1c705d49b6b5505dbf1e73.gz
2009-02-02 08:19:21 +10:00

4 lines
232 B
Fish

function __fish_complete_users --description "Print a list of local users, with the real user name as a description"
cat /etc/passwd | grep -ve '^#' | sed -e 's/^\([^:]*\):[^:]*:[^:]*:[^:]*:\([^:]*\):.*$/\1'\t'\2/' ^/dev/null
end