]> id.pley.net Git - dotfiles.git/commitdiff
Make pidof definition more x-platform-y.
authorJer Noble <jer.noble@apple.com>
Wed, 10 Apr 2013 00:41:15 +0000 (17:41 -0700)
committerJer Noble <jer.noble@apple.com>
Wed, 10 Apr 2013 00:41:15 +0000 (17:41 -0700)
zsh_aliases

index 80f9c856ed2e2455d37302b7064e04591b8fd22d..dae48a80b8282e58f37070204365030486cc4720 100644 (file)
@@ -52,7 +52,7 @@ function toss () { mv -f $@ ~/.trashcan; }
 function xcopy () { tar cvf - -C $1 $1/* | tar xvf - -C $2; }
 function checkdns () { ping $( grep nameserver /etc/resolv.conf | awk '{print $2}' | head -1); }
 
-if [[ $(/usr/bin/which -s pidof) -eq 0 ]]; then
+if [[ $(which pidof &> /dev/null; echo $?) -eq 1 ]]; then
     function pidof () { ps -e -o pid,comm | grep "$1" | awk '{print $1}'; }
 fi