color on the terminal

OP
Z

zero17

Guest
I feel stupid now...
I did change the .bashrc (chomd a+x .bashrc) then I "ls -al"
Code:
-rwxr-xr-x     1 adit  adit     1727 Jul  1 12:40 .bashrc
but it is still didn't change anything..
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Ok, you did restart Terminal first right? The shell has to re-read the file.
Here is my env:

Code:
MANPATH=/sw/share/man:/usr/local/share/man:/usr/share/man:/usr/X11R6/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
CLICOLOR=true
PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin
TERM_PROGRAM_VERSION=133
USER=craig
__CF_USER_TEXT_ENCODING=0x1F5:0:0
LSCOLORS=gxfxcxdxbxegedabagacad
PATH=/sw/bin:/sw/sbin:/usr/local/bin:/usr/include:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
PWD=/Users/craig
ERR=0
PS1=\n--[ \[\033[0;37m\]\d - \@ \[\033[m\]]--
--[ \[\033[0;37m\]\u \[\033[0;31m\]@ \[\033[0;37m\]\w \[\033[m\]]--$ \[\033[0;37;00m\]
SHLVL=1
HOME=/Users/craig
LOGNAME=craig
PROMPT_COMMAND=export ERR=$?
INFOPATH=/sw/share/info:/sw/info:/usr/share/info
SECURITYSESSIONID=685110
_=/usr/bin/env

See there where it shows clicolor? Does yours show it now?

The reason I asked what you created/edited the file with is it has to be a plain text file. It can't be rtf like from Textedit. (textedit can save as plain text)

If it shows up in env and it still doesn't do color, something else is wrong and beyond my knowledge.
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
If you have not done so yet. Either you can quit and restart the terminal application of bring up a new window. Then you should see your changes.
 
Joined
May 2, 2011
Messages
2
Reaction score
0
Points
1
Add .bashrc to .bash_profile

Hi, I was just reading this forum, and I thought ‘perhaps they don’t have the .bashrc file linked.’ I use Mac OS X 10.6.7, and the .bashrc is not linked by default.

To check, open ~/.bash_profile and check for the lines:

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

If they are not in there, you need them in order for your colors to be linked correctly every time you open Terminal. Once they’re in there and you have the colors you want in your .bashrc file:

export CLICOLOR='true'
export LSCOLORS=“gxfxcxdxbxegedabagacad”

Restart Terminal, and see if you get colors when you perform an ls.

Thanks,
Andrew
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Ummm, you do know this thread is 6 years old right?
 
Joined
May 2, 2011
Messages
2
Reaction score
0
Points
1
Yes, I’m aware, but I was having the same problem today. I thought I would post my solution just in case someone else happened to google this page with the same problem.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top