Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Volkner

macrumors newbie
Original poster
Jan 28, 2010
2
0
I like having the colored output for ls by using the -G flag (I even put an alias in my .bash_profile to make it default), but whenever I use the -G flag, it also messes up the spacing on the output. How can I make it so it has the same spacing as without the -G flag? And why is it changing it? I Googled and read the man page but couldn't find anything to fix it.
Code:
cameron-laptop:~ cameron$ ls
Desktop		Downloads	Movies		Pictures	Sites
Documents	Library		Music		Public
cameron-laptop:~ cameron$ ls -G
[COLOR="Blue"]Desktop   Downloads Movies    Pictures  Sites
Documents Library   Music     Public[/COLOR]
 
I like having the colored output for ls by using the -G flag (I even put an alias in my .bash_profile to make it default), but whenever I use the -G flag, it also messes up the spacing on the output. How can I make it so it has the same spacing as without the -G flag? And why is it changing it? I Googled and read the man page but couldn't find anything to fix it.
Code:
cameron-laptop:~ cameron$ ls
Desktop		Downloads	Movies		Pictures	Sites
Documents	Library		Music		Public
cameron-laptop:~ cameron$ ls -G
[COLOR="Blue"]Desktop   Downloads Movies    Pictures  Sites
Documents Library   Music     Public[/COLOR]

Well, maybe you can write your own script and pipe the output of ls to it ...

It's probably easier to just get used to the more compact output. After a bit of time you won't even notice it.
 
Put these two lines in your .bash_profile file:

export CLICOLOR=cons25
export TERM=xterm-color

Get rid of the "ls -G" alias.

Then type:

source .bash_profile

S-
 
Put these two lines in your .bash_profile file:

export CLICOLOR=cons25
export TERM=xterm-color

Get rid of the "ls -G" alias.

Then type:

source .bash_profile

S-

All of that does the same thing as "ls -G" just by default. The spacing is still more compact.

Code:
cameron-laptop:~ cameron$ pic .bash_profile
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
export PATH
alias tm=mate
export CLICOLOR=cons25
export TERM=xterm-color
cameron-laptop:~ cameron$ ls
[COLOR="Blue"]Desktop   Downloads Movies    Pictures  Sites
Documents Library   Music     Public[/COLOR]
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.