PDA

View Full Version : .bashrc help please


TraciC
October 1st, 2009, 06:53 AM
Hi,
Sorry for asking what is sure to be a stupidly easy question... what have I done wrong that makes my MacBook Pro (snow leopard) not recognize the aliases I've tried to add to my .bashrc file? They're super simple:

alias ll="ls -l"
alias la="ls -a"

I need to solve this problem before working on my rsync shell script. Thanks for your help!

-Traci

macbri
October 1st, 2009, 07:48 AM
Here's my setup (don't know when I set this up, but it works)

Check that you have a .bash_profile and it contains:

if [ -e ~/.bashrc ]; then
source ~/.bashrc
fi

ElDiabloConCaca
October 1st, 2009, 09:30 AM
Also, if I'm not mistaken (and it could very well work both ways), but in bash, enclosing a command should be done with single-quote characters (not double-quote), like so:

alias ll='ls -laFG'

...although I just tested it with double-quotes and it seems to work ok as well.

Just throwin' that out there... ;)

TraciC
October 1st, 2009, 10:03 AM
Thanks a lot guys. Believe it or not, wasn't in the bash shell, so have fixed THAT and now things work. God what a newbie.