Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Nov 2007 16:18:38 -0500
From:      Chuck Robey <chuckr@chuckr.org>
To:        =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= <des@des.no>
Cc:        freebsd-current@freebsd.org
Subject:   Re: a  better  lesskey  helper
Message-ID:  <4734CEAE.5090200@chuckr.org>
In-Reply-To: <868x57jfti.fsf@ds4.des.no>
References:  <4733AA45.6030905@chuckr.org>	<200711091309.56463.qpadla@gmail.com> <86lk97k54b.fsf@ds4.des.no>	<4734C440.4070100@chuckr.org> <868x57jfti.fsf@ds4.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smørgrav wrote:
> Chuck Robey <chuckr@chuckr.org> writes:
>> Dag-Erling Smørgrav wrote:
>>> Nikolay Pavlov <qpadla@gmail.com> writes:
>>>> There is already such a file there. You just need to proper set an
>>>> environment: setenv LESSOPEN '|lesspipe.sh %s'
>>> zless will do that for you.
>> Now I'm getting a bit confused.  I know you from long before, and I
>> know you wouldn't make mistakes easily.  MY zless here doesn't decode
>> executables and libs, but there's no man page, and zless --help gives
>> only the standard less help info, so I don;'t know what zless does
>> that less didn't do before I changed out the lesspipe.sh on my local
>> system.
> 
> "that" refers to Nikolay's setenv trick.  If you actually define
> LESSOPEN in your environment, less will always use it, which may not be
> what you want; instead, you can use less when you want to see the actual
> file and zless when you want it "decoded".

One other comment.  About your setting of defaults ... defaulting less 
to not working.  It comes down to this:  I have ocaisonally been 
surprised that a file was binary, but files that are binary, AND not elf 
encoded images, will still show up just like the current less without 
the objdump encoding I'm suggesting, no changes.  It's only the elf 
images that get routed thru objdump ... so, asking you, which happens 
more often, that you want to view the garbage binary via the default 
less behavior, or (on elf images) that you want to see any available elf 
info?

Personally, I do get ocaisonally surprised by a file being binary, but I 
have never yet hit the case that I wanted to see the straight binary 
(even when surprised) and not the decoded version.  Remember, with the 
improvement I'm suggesting, non-elf images STILL get the default 
behavior.  Are you sure you're not catering to the rare case, and making 
the usual case require extra steps?  Your opinion is good enough for me, 
go ahead and tell me what you think.



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