On Mar 26, 2010, at 10:09 PM, errordeveloper@gmail.com wrote:
Dan, i am sorry but your function { } business is teribly misleading! it's gust alias pd="/path/to/app/bin/pd" that anyone would ever need ..
Yeah, I hadn't tried an alias. I think it's a better option.
well, do you wanna go like:
PD=//Applications/Pd-extended.app/Contents/Resources/bin/pd THIS_COULD_BE_THE_ONLY_REASON_WHY_WE_NEED_IT=$MY_ERRORNO_CMD_NOT_FOUND
function pd { if [ -x $PD ] then
dirname $PD
/basename pd
else echo "COMMAND NOT FOUND, this is a redundant msg!" exit $THIS_COULD_BE_THE_ONLY_REASON_WHY_WE_NEED_IT }
I'm sorry but your example is terribly redundant. Obviously if you adding a function to your .bash_profile you would know that the binary should be there. I only supplied an approach that worked for me, sorry to post an inferior option. *sheesh*
I had the same issue when trying to use some scripts I made in Linux with pd. I solved it by adding some function wrappers to my ~/.bash_profile:
# pd commandline function pd { /Applications/Pd-extended.app/Contents/Resources/bin/pd $@; } export -f pd
function pdsend { /Applications/Pd-extended.app/Contents/Resources/bin/pdsend $@; } export -f pdsend
Make sure to restart the terminal session for it to take effect.
Dan Wilcox danomatika.com robotcowboy.com
Dan Wilcox danomatika.com robotcowboy.com