From f7f8a5c13d32dc4dba5d7e65c705bedfe0bc38ea Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Tue, 7 Feb 2017 15:32:07 +0000 Subject: [PATCH] etc/profile.d/mac.sh --- etc/profile.d/mac.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/etc/profile.d/mac.sh b/etc/profile.d/mac.sh index 18be8b61..3bafca14 100644 --- a/etc/profile.d/mac.sh +++ b/etc/profile.d/mac.sh @@ -26,7 +26,10 @@ alias strace='dtruss' alias updatedb='sudo sh -c "cd / && exec /usr/libexec/locate.updatedb"' seq() { - which seq && (eval "$(which seq) $@"; return) + if which seq; then + eval "$(which seq) $@" + return + fi if [ -n "$2" ]; then jot - "$1" "$2" else @@ -110,7 +113,6 @@ mac_user_top_proc() { } md5sum() { - #which md5sum && (eval "$(which md5sum) $@"; return) if which md5sum; then eval "$(which md5sum) $@" return @@ -246,7 +248,10 @@ mac_port_reinstall() { } getent() { - local cmd; cmd=`which getent` && (eval "$cmd $@"; return) + if which getent; then + eval "$(which getent) $@" + return + fi if [ "$1" = "group" -a -n "$2" ]; then grep "^$2:" /etc/group return -- 2.47.3