I have an alias that I've added to .bashrc, and it only activates in Terminal after I run the 'bash' command. I feel like I should know what's happening here, but I don't. :)
|
|
Depending on the version of OS X you are using your default shell might not be bash. You can verify this by typing(before you run 'bash'):
You can change your default shell to bash so you don't have to keep running the command by following the instructions here: http://serverfault.com/questions/21044/how-do-i-change-a-users-default-shell-in-osx From @chopper3
To further answer your question, the .bashrc is only used by the bash shell. If you want you can figure out what shell you are using and add the alias to the .tcshrc or .zshrc instead of changing everything to use bash. More info on what a shell is: http://en.wikipedia.org/wiki/Shell_(computing) and bash specifically: |
|||
|
|
|
From
Emphasis mine On OS X, all Terminal windows and tabs run login shells, which is equivalent to you running
Just create
Then |
||||
|
|
|
The alias doesn't work after you run Basically, So, to get back to your problem: your alias won't work until |
|||
|
|