From 49d3a58a9e692e1f1128b7ff7ade80e7dd0e9d13 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 25 Apr 2017 10:20:48 +0200 Subject: [PATCH] __fish_complete_users: Use `command`, not a hardcoded path --- share/functions/__fish_complete_users.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_complete_users.fish b/share/functions/__fish_complete_users.fish index 42473891d..9df28299e 100644 --- a/share/functions/__fish_complete_users.fish +++ b/share/functions/__fish_complete_users.fish @@ -2,10 +2,10 @@ # completion. If you just want a list of user names use __fish_print_users. function __fish_complete_users --description "Print a list of local users, with the real user name as a description" if test -x /usr/bin/getent - /usr/bin/getent passwd | cut -d : -f 1,5 | string replace -r ':' \t + command getent passwd | cut -d : -f 1,5 | string replace -r ':' \t else if test -x /usr/bin/dscl # This is the "Directory Service command line utility" used on macOS in place of getent. - /usr/bin/dscl . -list /Users RealName | string match -r -v '^_' | string replace -r ' {2,}' \t + command dscl . -list /Users RealName | string match -r -v '^_' | string replace -r ' {2,}' \t else if test -r /etc/passwd string match -v -r '^\s*#'