Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.bash_profile aliases: command not found

I cannot get my .bash_profile aliases to work on my Mac OSX Terminal. I created a .bash_profile file in my ~/ directory, then wrote two lines:

echo bash profile has loaded

alias prof=“open ~/.bash_profile”

I saved and entered in Terminal command:

. ~/.bash_profile

Terminal displayed:

bash profile has loaded

-bash: alias: /Users/kennethlarose/.bash_profile”: not found

I've been reading up on alias profiles, and I believe my syntax is valid. I know the profile is sourcing because it displays the echo, but Terminal will show the same 'not found' message no matter what command I save in the alias. Does anybody know what else I can try?

like image 885
Matt LaRose Avatar asked Aug 15 '14 00:08

Matt LaRose


1 Answers

Let's ask shellcheck!

In .bash_profile line 2:
alias prof=“open ~/.bash_profile”
           ^-- SC1015: This is a unicode double quote. Delete and retype it.

There's your problem. OS X has turned your double quotes into fancy slanted quotes that bash doesn't recognize. If you're programming, you may want to disable "smart quotes".

like image 87
that other guy Avatar answered Sep 20 '22 17:09

that other guy