4

When I try to create a file from the command line I get the error zsh: command not found: “open

This was working and stopped a few days ago :( In my .zshrc file the shortcut is: alias subl=“open -a 'Sublime Text'”

my $PATH is: /Users/joe/.rvm/gems/ruby-2.1.3/bin:/Users/joe/.rvm/gems/ruby-2.1.3@global/bin:/Users/joe/.rvm/rubies/ruby-2.1.3/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/joe/.rvm/bin:/Users/joe/.rvm/bin

Any ideas what I need to do to get my alias working again?

1
  • Barmar's answer worked
    – JAstuccio
    Commented Oct 7, 2014 at 22:08

1 Answer 1

6

You're using curly quotes in your alias command. Shells only use ASCII single quotes and double quotes. Change and to ":

alias subl="open -a 'Sublime Text'"

Don't use a word processor when editing shell scripts, use a programming text editor like emacs or vi, and they won't convert traditional quotes into curly quotes.

2
  • Thank you Barmar! I edited the file using nano. I do not have enough reputation to upvote yet.
    – JAstuccio
    Commented Oct 7, 2014 at 22:10
  • You don't need to upvote answers to your own question. Click on the check mark to accept the answer.
    – Barmar
    Commented Oct 8, 2014 at 14:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .