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?
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With