Re: less and color
My issue with this is that while -- ls --color=always | less -r -- works nicely, -- ls --color=always file.txt -- does not ( color codes ). I would like to include aliases to 'ls' and 'less' in my login profile to have '--color' and '-r' respectively, but run into the aforementioned problem. I feel too conditioned to type 'ls --color=always | less' in place of 'ls | less', but maybe that's just me ;) I suppose an alias 'lsl=ls --color=always | less -r' does the trick, but I would rather not use non-standard directory listing commands. whatever. Maybe some way to make 'less' pretend to be a tty ( !? ) would let 'ls --color=auto' work? -rob On Thu, Jan 27, 2000 at 03:47:33PM +0100, Matus fantomas Uhlar wrote: - I have got the same problem with 'more' and 'less' too. - - How did you configure 'ls' for displaying colors when piping to 'more' ? - I have setup the ls command to use the display color option using an - alias. It works fine. Colors are also displayed nicely when piping - ls stdout to the more command. I want to use less instead of - more. However, when piping ls stdout to the less command, less displays - the directory listing in b/w and with control characters (escape seq with - hex numbers?) around the filenames instead of just using the correct - colors. that's problem of lls not less try ls --color=always | less -r but the problem is in that case less doesn't know how long the line is and doesn't correctly diaplay it. -- Matus fantomas Uhlar, sysadmin at NEXTRA, Slovakia; IRCNET admin of *.sk [EMAIL PROTECTED] ; http://www.fantomas.sk/ ; http://www.nextra.sk/ Enter any 12-digit prime number to continue. -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null
Re: less and color
On 26/1/2000 [EMAIL PROTECTED] wrote: I have setup the ls command to use the display color option using an alias. It works fine. Colors are also displayed nicely when piping ls stdout to the more command. I want to use less instead of more. However, when piping ls stdout to the less command, less displays the directory listing in b/w and with control characters (escape seq with hex numbers?) around the filenames instead of just using the correct colors. Has anyone out there fixed this problem? I have tried changing the LESSCHARSET env. variable with no luck. Advice or tips would be appreciated. I should mention that I am using the console with $TERM=linux. for this reason and others such as redirecting ls output to a file i have set my alias to ls -l --color=auto which will cause normal non color listings when output goes anywhere but a tty. Then ls is sensing its output device and works accordingly? How does it do that?
Re: less and color
Then ls is sensing its output device and works accordingly? How does it do that? With the isatty(3) function. HTH, Eric -- E.L. Meijer ([EMAIL PROTECTED]) Eindhoven Univ. of Technology Lab. for Catalysis and Inorg. Chem. (SKA)
Re: less and color
I have got the same problem with 'more' and 'less' too. How did you configure 'ls' for displaying colors when piping to 'more' ? Thank you. -- Memo - Header --- To: debian-user@lists.debian.org cc: From: [EMAIL PROTECTED] Date: 26/01/2000 14:16:05 GMT 26/01/2000 15:24:58 Subject: less and color - Memo - Message -- I have setup the ls command to use the display color option using an alias. It works fine. Colors are also displayed nicely when piping ls stdout to the more command. I want to use less instead of more. However, when piping ls stdout to the less command, less displays the directory listing in b/w and with control characters (escape seq with hex numbers?) around the filenames instead of just using the correct colors. Has anyone out there fixed this problem? I have tried changing the LESSCHARSET env. variable with no luck. Advice or tips would be appreciated. I should mention that I am using the console with $TERM=linux. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= larry holish [EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null
Re: less and color
- I have got the same problem with 'more' and 'less' too. - - How did you configure 'ls' for displaying colors when piping to 'more' ? - I have setup the ls command to use the display color option using an - alias. It works fine. Colors are also displayed nicely when piping - ls stdout to the more command. I want to use less instead of - more. However, when piping ls stdout to the less command, less displays - the directory listing in b/w and with control characters (escape seq with - hex numbers?) around the filenames instead of just using the correct - colors. that's problem of lls not less try ls --color=always | less -r but the problem is in that case less doesn't know how long the line is and doesn't correctly diaplay it. -- Matus fantomas Uhlar, sysadmin at NEXTRA, Slovakia; IRCNET admin of *.sk [EMAIL PROTECTED] ; http://www.fantomas.sk/ ; http://www.nextra.sk/ Enter any 12-digit prime number to continue.
Re: less and color
more handles colors fine. But you must add the --color option to ls when piping if you want colors. less needs the -r option to handle colors. [EMAIL PROTECTED] wrote: : I have got the same problem with 'more' and 'less' too. : How did you configure 'ls' for displaying colors when piping to 'more' ? : Thank you. :-- Memo - Header --- : To: debian-user@lists.debian.org : cc: : From: [EMAIL PROTECTED] : Date: 26/01/2000 14:16:05 GMT : 26/01/2000 15:24:58 : Subject: less and color : - Memo - Message -- : I have setup the ls command to use the display color option using an : alias. It works fine. Colors are also displayed nicely when piping : ls stdout to the more command. I want to use less instead of : more. However, when piping ls stdout to the less command, less displays : the directory listing in b/w and with control characters (escape seq with : hex numbers?) around the filenames instead of just using the correct : colors. : Has anyone out there fixed this problem? I have tried changing the : LESSCHARSET env. variable with no luck. Advice or tips would be : appreciated. I should mention that I am using the console with : $TERM=linux. : =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= : larry holish [EMAIL PROTECTED] : =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= : -- : Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] : /dev/null : -- : Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null -- *** Running Debian Linux *** * For God so loved the world that He gave his only begotten Son, * * that whoever believes in Him should not perish...John 3:16 * * W. Paul Mills * Topeka, Kansas, U.S.A. * * EMAIL= [EMAIL PROTECTED] * WWW= http://Mills-USA.com/ * * Bill, I was there several years ago, why would I want to go back? * * pgp public key on keyservers everywhere? */ --
less and color
I have setup the ls command to use the display color option using an alias. It works fine. Colors are also displayed nicely when piping ls stdout to the more command. I want to use less instead of more. However, when piping ls stdout to the less command, less displays the directory listing in b/w and with control characters (escape seq with hex numbers?) around the filenames instead of just using the correct colors. Has anyone out there fixed this problem? I have tried changing the LESSCHARSET env. variable with no luck. Advice or tips would be appreciated. I should mention that I am using the console with $TERM=linux. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= larry holish[EMAIL PROTECTED] =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Re: less and color
On 26/1/2000 [EMAIL PROTECTED] wrote: I have setup the ls command to use the display color option using an alias. It works fine. Colors are also displayed nicely when piping ls stdout to the more command. I want to use less instead of more. However, when piping ls stdout to the less command, less displays the directory listing in b/w and with control characters (escape seq with hex numbers?) around the filenames instead of just using the correct colors. Has anyone out there fixed this problem? I have tried changing the LESSCHARSET env. variable with no luck. Advice or tips would be appreciated. I should mention that I am using the console with $TERM=linux. for this reason and others such as redirecting ls output to a file i have set my alias to ls -l --color=auto which will cause normal non color listings when output goes anywhere but a tty. -- Ethan Benson To obtain my PGP key: http://www.alaska.net/~erbenson/pgp/
Re: less and color
On 26/1/2000 [EMAIL PROTECTED] wrote: I have setup the ls command to use the display color option using an alias. It works fine. Colors are also displayed nicely when piping ls stdout to the more command. I want to use less instead of more. However, when piping ls stdout to the less command, less displays the directory listing in b/w and with control characters (escape seq with hex numbers?) around the filenames instead of just using the correct colors. Has anyone out there fixed this problem? I have tried changing the LESSCHARSET env. variable with no luck. Advice or tips would be appreciated. I should mention that I am using the console with $TERM=linux. for this reason and others such as redirecting ls output to a file i have set my alias to ls -l --color=auto which will cause normal non color listings when output goes anywhere but a tty. Have you tried giving less the -r switch? I don't have any alises, but ls --color | less -r works fine for me. Please forgive me if this is obvious and not the solution to your problem:) Hans
Re: Less in color?
Asher Haig [EMAIL PROTECTED] writes: That doesn't seem to do anything different. My problem is that when I pipe an ls to less, I end up with a bunch of b/w color codes instead of colors. Makes it hard to read. Did you do ls -r? That seems to be the key. -- Michael D. Harnois, Redeemer Lutheran Church, Washburn, IA [EMAIL PROTECTED] [EMAIL PROTECTED] Sed quis custodiet ipsos custodes? -- Juvenal -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Less in color?
Is there a version of Less that will support color ls? == | Asher Haig[EMAIL PROTECTED] | | Pager/Voice Mail (972) 328-9247 | == It was like a visit by Don Carleone. I expected to find a bloody computer monitor in my bed the next day. -- Mark Andreessen regarding the visit from Microsoft. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Less in color?
George Bonser, [EMAIL PROTECTED] on 5/30/98 6:08 AM try ls --color=always On Thu, 30 Apr 1998, Asher Haig wrote: Is there a version of Less that will support color ls? That doesn't seem to do anything different. My problem is that when I pipe an ls to less, I end up with a bunch of b/w color codes instead of colors. Makes it hard to read. == | Asher Haig[EMAIL PROTECTED] | | Pager/Voice Mail (972) 328-9247 | == It was like a visit by Don Carleone. I expected to find a bloody computer monitor in my bed the next day. -- Mark Andreessen regarding the visit from Microsoft. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Less in color?
On Thu, 30 Apr 1998, Asher Haig wrote: Is there a version of Less that will support color ls? ls --color=always | less -r -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Less in color?
On Thu, 30 Apr 1998, Asher Haig wrote: Is there a version of Less that will support color ls? Asher My settings are as follows. I have no trouble with ls |less. 09:49:54:~$alias ls alias ls='/usr/bin/color-ls $LS_OPTIONS ' 09:49:58:~$echo $LS_OPTIONS --8bit --color=tty -F --David David B Teague | Ask me how user interface copyrights software [EMAIL PROTECTED] | patents make programing a dangerous business. clipper National Security nuclear explosion Treasury terrorist Delta Force bomb India Mossad data encryption munitions Pakistan hydrazine ammonium nitrate fuel oil cocaine assassinate counterfeit destabilize -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]