mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 17:43:44 +08: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.
12 lines
302 B
Fish
12 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
|
|
|