You are not logged in.

#1 2006-01-16 22:52:39

Eliatamby
Member
Registered: 2005-05-06
Posts: 80

Less with colour

Does anyone know how to use Less in the console with colour?  For example, piping ls through less loses all the directory/symlink colour codes etc.  I use view now for reading files, but for non-files view doesn't work.  If you cannot use less with console colour, are there any similar programs with this enabled? 

Thanks

Offline

#2 2006-01-17 23:56:51

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Less with colour

Not exactly an answer to your question, but to help differentiating the file types when using <code>ls</code> when you don't have color, you could do this:

ls -F | less

Which will insert symbols after the pathname to let you know what they are...

'/' = directory
'*' = executable
'@' = symbolic link
'=' = socket
'%' = whiteout
'|' = FIFO

Offline

#3 2006-01-18 06:32:29

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Less with colour

I don't know of any pages that work that way - but 'most' will colorize manpages.

Offline

#4 2006-01-19 09:03:11

Eliatamby
Member
Registered: 2005-05-06
Posts: 80

Re: Less with colour

Thanks guys.

Offline

#5 2006-01-22 08:00:26

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Less with colour

Hi all,
this alias works for me:

alias ls='ls --color=always'

Offline

Board footer

Powered by FluxBB