[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buglet in less?
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Buglet in less?
- From: Morten Liebach <morten_(_at_)_hotpost_(_dot_)_dk>
- Date: Thu, 19 Oct 2000 22:55:20 +0200
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
On 19, Oct, 2000 at 03:29:28PM -0400, Matthew Weigel wrote:
> Morten Liebach wrote:
> > 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  it is, works fine.
> > lessclose.sh is like this
> > #!/bin/sh
> > rm $2
> It looks like lessclose.sh should be
> #! /bin/sh
> rm $1
No difference. :-(
I did try that as the first thing though, before I posted.
> > Also, how do I get the same prompt ("-P%i %f line %lt of %L $") when
> > viewing manpages as when I use less?
> Wouldn't that be from setting MANPAGER (looking at the docs, maybe just
> PAGER) to '/usr/bin/less -P...'.
Of course, I were looking at /etc/man.conf and such, silly me.
It works beutifully!
> > : 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.?
> file(1) might do that. It might well simply do pattern matching, but I don't
> think so.
> You get to write a script that uses file(1) as an after-class exercise.
Kewl, I'll do, someday ... right now I'll get it working and I'm not
home over the weekend and ... have you ever heard the saying: ``The road
to hell is paved with bad excuses!'' (it might be a danish one).
> Matthew Weigel
> Research Systems Programmer
Sounds like an incredibly cool thing to do, any fun? :-)
UNIX, reach out and grep someone!
Visit your host, monkey.org