News for hackers. Stuff that matters.
Re:My intro to LESS - If you're not using it, you should be. by shabble on Sunday September 02, 2012 @09:59PM (#4468840)
Also, you should consider:

    export LESS=-i -g -M -R -x4 -X -f -F -z-1
for a much happier pager.
Re:My intro to LESS - If you're not using it, you should be. by adamt on Monday September 03, 2012 @03:17AM (#4469433)
Err .... is this some attempt at humour or have you guys commenting about less (the more replacement) here not read the article (about less the CSS framework)?!!
Re:My intro to LESS - If you're not using it, you should be. by zdw on Monday September 03, 2012 @08:32AM (#4470139)
Obviously it's a joke. Hackers tend to like jargon jokes.

I'd expect an article about the pre-Christian era world to include similar references like "BC_ENV_ARGS="-q $(echo ~)/.bc"

Re:My intro to LESS - If you're not using it, you should be. by ralph on Monday September 03, 2012 @04:44AM (#4469638)
That's missing some quotes; it's trying to set an environment variable called -g, which is an invalid identifier. Mine is

    export PAGER=less LESS='-wiXz-2$j15' LESSBINFMT=.
Re:My intro to LESS - If you're not using it, you should be. by brokenparser on Monday September 03, 2012 @06:32AM (#4469908)
Most is even better. Unlike other paging programs, most is capable of displaying an arbitrary number of windows as long as they all fit on the screen, and different windows could be used to view the same file in different positions.

In addition to displaying ordinary text files, most can also display binary files as well as files with arbitrary ascii characters.

Re:My intro to LESS - If you're not using it, you should be. by RKearney on Sunday September 02, 2012 @10:25PM (#4468888)
Mind explaining what this does?
Re:My intro to LESS - If you're not using it, you should be. by DArcMattr on Sunday September 02, 2012 @11:34PM (#4469004)
-i = ignore case

-g = highlight the particular string that's been found by the last search command

-M = verbose prompt

-R = all control characters, 'R' for Raw

-x4 = tabs take 4 spaces

-X = don't reinit the screen when the pager exits

-f = force open any kind of file

-F = end the pager when the end of the file has been reached

-z-1 = use 1 less line for a screen's worth of content

Re:My intro to LESS - If you're not using it, you should be. by shabble on Monday September 03, 2012 @12:09AM (#4469060)
Thanks, I should probably have actually mentioned what it does initially :)

Couple of minor points:

-F is actually 'quit immediately if the input is less than 1 screen-worth of text'. It means you can just pipe any old thing into it, and if it's only a couple of lines, you don't have to quit manually.

-e/-E is the 'quit when reaching input EOF', with a nice little trick that -e only quits the second time you reach EOF, so you can go right to the end of the file, and to quit just hit space or whatever to seek further.

The other thing is:

   -R : Like -r, but only ANSI "color" escape sequences are
        output in "raw" form. Unlike -r, the screen 
        appearance is maintained correctly in most cases.
whereas you're describing -r. I'd definitely recommend big-R if you don't enjoy periodic symboljunk terminal confusion.