Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a .bash_profile file containing a number of bash customizations. I have the same file on a Linux server and locally on my Mac. On the server, everything behaves as expected. However, locally on my Mac I am having trouble. I have a basic alias that looks like this to add color to my directory names:

alias ls='ls -G'

If I run a $ ls -G command from the command line, the command works and my directories are colored. However, if I alias the command in my bash_profile and then type ls I do not get directory highlighting. I tried to add this alias to my .bashrc as well, but that didn't work either. Does anyone know what my problem is? Thanks in advance for the help.

share|improve this question
Does the alias show up when you just type alias? Do any of the other customizations work on your Mac? – Mat Oct 5 '11 at 12:33
The ls -G alias does not show up. The strange thing is that I have another alias (ls -aF) also in my .bash_profile that shows up and also works just fine. – dr.bunsen Oct 5 '11 at 12:57
Can you post your complete .bash_profile file please? – Mat Oct 5 '11 at 12:58
Ah my apologizes, I figured out the problem. I was mapping two commands to the same alias. – dr.bunsen Oct 5 '11 at 12:59

closed as too localized by rozcietrzewiacz, Michael Mrozek Oct 5 '11 at 13:07

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.