fish-shell/share/functions/__fish_print_users.fish
Kurtis Rader 37508d1f1e refactor the __*_users functions
Per my comment in issue #3980 this implements `__fish_print_users` in
terms of `__fish_complete_users` so we don't have to modify both when a
change to how users are enumerated is needed.
2017-04-23 20:08:40 -07:00

8 lines
429 B
Fish

# This should be used where you want user names without a description. If you also want
# a description, such as when getting a list of users for a completion, you probably want
# __fish_complete_users.
function __fish_print_users --description "Print a list of local users"
# Leave the heavy lifting to __fish_complete_users but strip the descriptions.
__fish_complete_users | string replace -r '^([^\t]*)\t.*' '$1'
end