]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/mac.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 7 Feb 2017 15:32:07 +0000 (15:32 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 7 Feb 2017 15:32:07 +0000 (15:32 +0000)
etc/profile.d/mac.sh

index 18be8b61dbe659bd24a73fe2bccd4fbdcddc2d51..3bafca14479e847b5b3032bb678e97ea42be5a33 100644 (file)
@@ -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