mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
36691df6fe
I believe apm must have been buggy - example output that I found online showed `tr` was mangling paths with spaces in it. Should be fixed. Also, use dscl on OS X in __fish_complete_users.fish like __fish_print_users.fish already does.
11 lines
302 B
Fish
11 lines
302 B
Fish
|
|
function __fish_print_users --description "Print a list of local users"
|
|
if test -x /usr/bin/getent
|
|
getent passwd | cut -d : -f 1
|
|
else if test -x /usr/bin/dscl # OS X support
|
|
dscl . -list /Users | string match -r -v '^_'
|
|
else
|
|
string match -v -r '^\w*#' < /etc/passwd | cut -d : -f 1
|
|
end
|
|
end
|
|
|