I want to add a simple alias to my .bash_profile but no matter what quote method I use, I get an error.

I want to add this to my profile alias htdoc=cd /Applications/MAMP/htdocs/. Despite what quotes I use, I get this error

-bash: alias: /Applications/MAMP/htdocs/‘: not found

-bash: alias: ‘/Applications/MAMP/htdocs/‘“: not found

-bash: alias: ‘/Applications/MAMP/htdocs/‘: not found

-bash: alias: “/Applications/MAMP/htdocs/“: not found

-bash: alias: “/Applications/MAMP/htdocs/“‘: not found

1 Answer 1


The quote characters you are using are special Unicode quotes, the (U+201C, left double quotation mark) and (U+2018 - left single quotation mark) -- probably resulting of a copy and paste?.

You should use one of the plain ASCII quote character instead:

alias htdoc='cd /Applications/MAMP/htdocs/'


alias htdoc="cd /Applications/MAMP/htdocs/"
  • I was using Mac TextEdit. That may be the problem right there. I'll try nano. I'll let you know. Thanks.
    – Mike S.
    Jan 17, 2014 at 16:53
  • That was it. I knew it was something simple. Stupid text editor!
    – Mike S.
    Jan 17, 2014 at 16:56
  • Right! Something similar happens to me when I write in certain editors in the browser -- silly editors indeed. =)
    – elias
    Jan 17, 2014 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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