This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
Subject: Re: Bash Config From: Bernhard Rosenkraenzer <bero@redhat.de> Date: Thu, 6 Jan 2000 15:36:45 +0100 (CET) On Thu, 6 Jan 2000, Brian Ivey wrote: > I've been trying to configure my bash shell. How do I add color to the ls > command? The easy way: get the fileutils RPM from rawhide. The hard way: add "alias ls='ls -CF --color=tty'" to your .bashrc LLaP bero === Subject: Re: Bash Config From: Tom Watts <wattst@friedmancorp.co.uk> Date: Thu, 06 Jan 2000 14:40:23 +0000 Brian Ivey wrote: > Dear List: > > I've been trying to configure my bash shell. How do I add color to the ls > command? When I type ls, I would like to have directories, files, etc. to > appear in different colors. I know it can be done, but I cannot seem to find > the way to it. In your .bashrc file you need to add the line: alias ls="ls --color=tty" === Subject: RE: Bash Config From: Zoki <zoki@magic.fr> Date: Fri, 7 Jan 2000 09:04:09 +0100 (CET) On Thu, 6 Jan 2000, Brian Ivey wrote: ->>Did you even bother to read the man page? -> ->Honestly, no. I appreciate your candor and will, for future problems, ->attempt to find a solution in the man pages first. *** Brian, You'll have the opportunity to do so as I won't tell you what the options down here will do. If you create the followin alias in .bashrc you'll see everything you might want to see: alias l='ls -Falh --color=auto' Don't forget <source .bashrc> to activate the changes. === -- -- Subject: Re: ls and color From: Bill Carlson <wcarlson@vh.org> Date: Mon, 31 Jan 2000 09:12:09 -0600 (CST) On Fri, 28 Jan 2000, Gordon Messmer wrote: > jack wallen jr wrote: > > > > what is the diff between running 'ls --color=tty' and just 'ls --color?' > > ls --color will always output color. ls --color=tty will only output > color when stdout is a tty. > I usually use 'ls --color=auto' to get around this problem. === Subject: Re: ls and color From: Dominic Mitchell <dominic@cedep.net> Date: 28 Jan 2000 10:55:01 -0500 You can do this by editing your .dir_colors file. Then you need to run eval dircolors ~/.dir_colors > ~/colors this will produce an output like: LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:or=01;05;31:pi=40;33:so=01 [snip] export LS_COLORS Just paste the content of the file in .bash_profile. Run source ~/.bash_profile === Subject: Re: ls and color From: Gordon Messmer <yinyang@eburg.com> Date: Fri, 28 Jan 2000 08:18:49 -0800 jack wallen jr wrote: > > what is the diff between running 'ls --color=tty' and just 'ls --color?' ls --color will always output color. ls --color=tty will only output color when stdout is a tty. The difference shows up when you do something like `ls --color | less`. It's troublesome when you do something like `ls --color *jpg | xargs ee`. In the latter case, ee will get a bunch of terminal codes as part of the filenames, and won't be able to open any of the files that you thought you had specified (this would probably only happen if you had ls aliased to ls --color) === Subject: Re: ls and color From: Bernhard Rosenkraenzer <bero@redhat.de> Date: Fri, 28 Jan 2000 17:27:31 +0100 (CET) On Fri, 28 Jan 2000, Fernando Rowies wrote: > I use this sentence in bashrc to have color with ls: > alias ls='ls --color=tty' > The question is, how can I modifiy the actual status > to have i.e. rpm orange, tar red, etc.? vi /etc/DIR_COLORS eval `dircolors` ===