[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Buglet in less?
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Buglet in less?
- From: Morten Liebach <morten_(_at_)_hotpost_(_dot_)_dk>
- Date: Thu, 19 Oct 2000 20:59:32 +0200
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
Hi all.
I try to make less read compressed files with the type of script in
man 1 less, so I set some environmentvars in $HOME/.zshenv:
export LESS="-P%i %f line %lt of %L $"
export LESSOPEN="$HOME/bin/lessopen.sh %s"
export LESSCLOSE="$HOME/bin/lessclose.sh %s"
export LESSCHARSET="latin1"
and make the appropriate scripts executable, and test it.
lessopen.sh checks whether it's a compressed file, and acts according to
which compression [1] it is, works fine.
lessclose.sh is like this
#!/bin/sh
rm $2
as per the example, but it does not remove the tmp-file as I understand
it should according to the manpage.
Is this a bug, and if so, is it the docs or the binary?
Also, how do I get the same prompt ("-P%i %f line %lt of %L $") when
viewing manpages as when I use less?
pc89225% uname -a
OpenBSD pc89225 2.8 PC89225#0 i386
built from source from about 4-5 days ago, has run without a hitch
since, nice. :-)
Regards
Morten
[1]: Can't this be done based on the contents of the file, and not the
suffix as I do now, e.g. `*.Z => uncompress' etc.?
--
UNIX, reach out and grep someone!
GnuPG key: http://home1.stofanet.dk/liebach/pgpkey.txt
Visit your host, monkey.org