You are not logged in.

#1 2012-06-23 22:09:59

ayr0
Member
Registered: 2010-08-12
Posts: 94

configuring less

Hi,

I've been trying to configure less to be less annoying.  The sources that I've read online note that less is configured by setting an environment variable with the desired options.
The options that I've set so far are "-RSiMg"

An option that I want to set is -F which will terminate less if the output fits on one screen.  However, when I add "F" to the options list, less will not output anything if the output fits on one screen.

Any idea of how to fix this would be appreciated.  It is kind of distracting when less clears my screen to display only a few lines at the bottom.

Thanks.

Offline

#2 2012-06-23 22:24:57

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: configuring less

I'm not sure, but it may be working as intended; 'less' is not 'cat' so 'less -F' will show the contents of a short file for a split second and terminate, returning to the shell prompt.

Offline

#3 2012-06-23 23:09:08

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: configuring less

Try adding "-X". This may produce unwanted side-effects but you should try it. That's the only option I have set and if I do "less -F" on a short file, it displays it fine (it is just like using cat).


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#4 2012-06-24 13:10:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: configuring less

'less -X' sounds exactly like what ayr0 wants ... and I may start using it too ;P
Thanks, cfr :-)

Offline

#5 2012-10-04 01:09:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: configuring less

Closing as it is asked again here: https://bbs.archlinux.org/viewtopic.php?id=150034


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB