Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I installed MIT/GNU scheme and am trying to add the directory to my $PATH variable so that I can run it from Terminal.

The app name MIT:GNU Scheme.app is a veritable "perfect storm" (for path names) as it includes a colon and a space.

I've tried adding each of the following to my ~/.bash_profile, none have worked:

export PATH=$PATH:"/other/paths:/Applications/MIT\:GNU\ Scheme.app/Contents/Resources"
export PATH=$PATH:"/other/paths:/Applications/MIT\:GNU Scheme.app/Contents/Resources"
export PATH=${PATH}:"/other/paths:/Applications/MIT\:GNU\ Scheme.app/Contents/Resources"
export PATH=${PATH}:"/other/paths:/Applications/MIT\:GNU Scheme.app/Contents/Resources"
share|improve this question

1 Answer 1

up vote 3 down vote accepted

It won't work. You have several options:

  1. Create an alias for bash to run the command.
  2. Create a symbolic link to the executable from a directory in your PATH. (I like to have a directory ~/bin at the front of my path for such things.)
  3. Create a symbolic link to /Applications/MIT\:GNU\ Scheme.app/Contents/Resources somewhere and put the link in your PATH.
  4. Rename the application.
share|improve this answer
    
Creating an alias worked, thanks. A symbolic link to the directory didn't for some reason, something specific to the app, I suppose. Is it OK to just rename a .app and have everything work as it should? –  jjeaton Jun 6 '12 at 14:26
    
I am not sure if just renaming the app will work. Perhaps you need to change the value of CFBundleDisplayName inside Contents/Info.plist as well. –  Harald Hanche-Olsen Jun 6 '12 at 14:48
    
I'll stick with the alias, was just curious whether that was allowed. –  jjeaton Jun 6 '12 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.