On Mon, Jun 20, 2011 at 05:50:02PM -0400, Robert Citek wrote: > What puzzles me is what Nehemiah has pointed out: that man uses > less[1], yet there doesn't seem a way to easily pass options to less. > The two methods that get around this seem to be to use a pipe (as I > used before) or temporarily modify the PAGER or MANPAGER environment > variables: > > $ PAGER='less -iX "+/\+cmd"' man less > $ MANPAGER='less -iX "+/\+cmd"' man less > > That strikes me as kludgy, but it works.
Slightly less kludgy is using the LESS environment variable $ LESS="$LESS +/ENVIRONMENT" man less For me, LESS is usually set to -eiMXR. > [1] actually, man uses pager, which on Ubuntu eventually points to > less by default > > $ which pager | xargs readlink -e > /bin/less > > Regards, > - Robert > > On Mon, Jun 20, 2011 at 4:51 PM, Mike B. <[email protected]> wrote: > > Wow, Robert. You never cease to amaze me. I thought of trying > > something like that but I didn't think it would work either. > > > > > > On Mon, Jun 20, 2011 at 11:25 AM, Robert Citek <[email protected]> > > wrote: > >> On Mon, Jun 20, 2011 at 12:02 PM, Nehemiah Dacres <[email protected]> > >> wrote: > >>> less doesn't take commands from the command line like vi does > >> > >> Are you sure? > >> > >> Have a look here: > >> > >> $ man less | less '+/\+cmd' -- David Dooling http://www.politigenomics.com/ -- Central West End Linux Users Group (via Google Groups) Main page: http://www.cwelug.org To post: [email protected] To subscribe: [email protected] To unsubscribe: [email protected] More options: http://groups.google.com/group/cwelug
