mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 12:13:55 +08:00
37508d1f1e
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.
8 lines
429 B
Fish
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
|