Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Nov 2007 18:15:34 -0500
From:      Chuck Robey <chuckr@chuckr.org>
To:        bv@wjv.com
Cc:        freebsd-current@freebsd.org
Subject:   Re: a better  lesskey helper
Message-ID:  <4734EA16.5090800@chuckr.org>
In-Reply-To: <20071109224531.GA58036@wjv.com>
References:  <20071109222421.037E116A494@hub.freebsd.org> <20071109224531.GA58036@wjv.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Bill Vermillion wrote:
>>> I really wouldn't want to bother folks anymore on this if I'm
>> all wet? Does your less not decode tar.gz things? What does your
>> zless do that your less doesn't? Does either your zless or your
>> less decode executables and libraries (via a objdump pipe)?
> 
>> I gotta admit, I'd never heard of zless.
> 
> I've found that 'most' is quite handy.  It decodes binaries when it
> finds thems, it decompresses gzipped files.   
> 
> It's in /usr/ports/sysutils/most

That sort of behavior is (I think, I haven't yet checked most) what I am 
suggesting be brought into less.  Look, let me repeat, now that I have 
gotten confirmation that I wasn't wrong (thanks to Carl).  It's this:

1: modify our lesspipe.sh, so that, in addition to the detection of 
various tar archives (along with compression), it also detects various 
elf images, and uses objdump to display the info.  Less will keep the 
current behavior on any other binaries it hits, only decoding the elf 
images.

2) add 1 line to our /etc/csh.cshrc and /etc/profile (to cover those sh 
and csh compatible shells) so that the lesspipe.sh functionality no 
longer needs folks to remember zless.  I don't think it's needed, but if 
  users ask for it, it would be trivial to code up a variable, like 
LESS_WITHOUT_LESSPIPE, that if defined could even block out these 
changes.  I can't see why folks would not want it, but I'm not fanatic 
over it.

3) remove zless.

I haven't been a committer for a great long time.  I'm coming back to 
FreeBSD now, but until I have a bit more experience with all the changes 
(so I don't just recommit everyone's mistakes from the last couple 
years) I think I maybe shouldn't just go ahead and commit.  Let some 
actual current committer stick it in.

Look, the changes I'm suggesting are very very trivial, but if you want 
it, I could easily package things up as a diff.  Or, if anyone at all 
wants to see my proposed lesspipe.sh, well, just mail me and ask for it. 
  I gotta go ask and find out who gets the credit (I stole my copy from 
Gentoo Linux).  I have a bad habit about that:  I care absolutely zero 
about credit, and I sometimes forget that others do care.  It's an 
honest mistake that I don't mind being reminded about, if someone 
notices me doing that.  Certainly, going to any lengths to give ME 
credit of this would be kinda silly, but I do get confused sometimes 
about where to draw the line.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4734EA16.5090800>