[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buglet in less?



On 19, Oct, 2000 at 08:07:05PM +0000, Christian Weisgerber wrote:
> Morten Liebach <morten_(_at_)_hotpost_(_dot_)_dk> wrote:
> 
> > 	export LESSCLOSE="$HOME/bin/lessclose.sh %s"
>                                                  ^^^
> > lessclose.sh is like this [...]
> > as per the example, but it does not remove the tmp-file as I understand
> > it should according to the manpage.
> 
> Actually, your mistake is obvious from the man page:
> 
> |        To set up an input postprocessor, set the LESSCLOSE
> | environment  variable  to a command line which will invoke
> | your input postprocessor.  It may include two  occurrences
> | of  the string "%s"; the first is replaced with the origi-
> | nal name of the file and the second with the name  of  the
> | replacement file, which was output by LESSOPEN.
> 
> I.e., you need LESSCLOSE="$HOME/bin/lessclose.sh %s %s".

You are so right, I now have the `less'-setup of my dreams! ;-)
It has only taken about 3 hours or so. :-)

> > Also, how do I get the same prompt ("-P%i %f line %lt of %L $") when
> > viewing manpages as when I use less?
> 
> Make "less" your pager for viewing man pages (and default pager in
> general).
> 
> export PAGER=/usr/bin/less

No. I've now put `export MANPAGER="/usr/bin/less -P%f line %lt of %L $"'
in my $HOME/.zshenv. I already had $PAGER set to less ...

Matthew Weigelt were right. :-)

Thanks
		Morten
			
-- 
UNIX, reach out and grep someone!




Visit your host, monkey.org