mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
Fix user completion so it can handle comments in the passwd file. Patch by Sven Axelsson.
darcs-hash:20090201221921-ac50b-ef0883afe4dc68b43c1c705d49b6b5505dbf1e73.gz
This commit is contained in:
parent
c8de3d24c8
commit
4f54da3795
@ -1,4 +1,4 @@
|
||||
|
||||
function __fish_complete_users --description "Print a list of local users, with the real user name as a description"
|
||||
cat /etc/passwd | sed -e "s/^\([^:]*\):[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1\t\2/"
|
||||
cat /etc/passwd | grep -ve '^#' | sed -e 's/^\([^:]*\):[^:]*:[^:]*:[^:]*:\([^:]*\):.*$/\1'\t'\2/' ^/dev/null
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user