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

Re: Buglet in less?



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".

> 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

-- 
Christian "naddy" Weisgerber                          naddy_(_at_)_mips_(_dot_)_inka_(_dot_)_de




Visit your host, monkey.org