use PATH to find getent in __fish_complete_groups (#3383)

This commit is contained in:
Andrew Schulman 2016-09-16 12:26:27 -04:00 committed by Fabian Homborg
parent 05b52eaa0b
commit 0a6dc2addb

View file

@ -1,6 +1,6 @@
function __fish_complete_groups --description "Print a list of local groups, with group members as the description"
if test -x /usr/bin/getent
if command -s getent >/dev/null
getent group | cut -d ':' -f 1,4 | sed 's/:/\t/'
else
cut -d ':' -f 1,4 /etc/group | sed 's/:/\t/'