Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: "Joe" Subject: Re: ls -l | less shows "escape" chars Date: Thu, 1 Jul 2004 17:23:48 -0400 Lines: 37 Message-ID: References: X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: 146.145.51.166 X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 The only downside is if you need the output to go to a file or a pipe to a different program. If you still have ls aliased to "ls --color", then this: ls > /tmp/filelist will still put escape codes in filelist. "ls --color=auto" won't - it will keep it plain ascii text. If you never do that, then it's not an issue though. "geneSmith" wrote in message news:cc1e2r$f56$1 AT sea DOT gmane DOT org... > Joe wrote, On 7/1/2004 11:09 AM: > > > Either don't use color or change it to --color=auto. > > > > I alias ls to "ls -x -color=auto". > > > > Then "ls | less" gives you columns without escape codes. > > > > If you want a single column, use "ls -1 | less". The -1 overrides the -x in > > the alias and gives one column. Or leave out the -x if you never want > > columns when piping to less. > > Thanks for the info. However when I put > alias less="less -R" > in my ~/.bash_profile it seem to work and and still get colors when I do > ls -l | less. > > -gene > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/