diff options
author | 2009-02-02 08:19:21 +1000 | |
---|---|---|
committer | 2009-02-02 08:19:21 +1000 | |
commit | 4f54da3795e90128b1efa0b4a956f2e3878b8d9e (patch) | |
tree | eefd2830b618aa44a39677766234cd3c9f77bd07 /share/functions/__fish_complete_users.fish | |
parent | c8de3d24c84dd94348692e605c54559b9b55eb18 (diff) |
Fix user completion so it can handle comments in the passwd file. Patch by Sven Axelsson.
darcs-hash:20090201221921-ac50b-ef0883afe4dc68b43c1c705d49b6b5505dbf1e73.gz
Diffstat (limited to 'share/functions/__fish_complete_users.fish')
-rw-r--r-- | share/functions/__fish_complete_users.fish | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/functions/__fish_complete_users.fish b/share/functions/__fish_complete_users.fish index a804ec02..e3ca35f4 100644 --- a/share/functions/__fish_complete_users.fish +++ b/share/functions/__fish_complete_users.fish @@ -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 |