untouched bug in less package
Fergal Daly
fergal at esatclear.ie
Fri Oct 26 20:25:55 UTC 2007
On 26/10/2007, Markus Hitter <mah at jump-ing.de> wrote:
>
> Am 26.10.2007 um 16:09 schrieb Fergal Daly:
>
> > I filed this bug in June
> >
> > https://bugs.launchpad.net/ubuntu/+source/less/+bug/120459
> > [...]
> > The basic problem is that lesspipe uses $SHELL to tell what the
> > current shell is,
>
> I'm not sure wether $SHELL contains the preferred shell (my opinion)
> or the current shell (your opinion).
Actually your opinion == my opinion == bash manpage's opinion
SHELL The full pathname to the shell is kept in this environment vari‐
able. If it is not set when the shell starts, bash assigns to it
the full pathname of the current user's login shell.
tcsh's opinion I don't understand, the manpage doesn't mention $SHELL
but I seem to have it set.
The problem is that lesspipe uses $SHELL to decide what type of shell
invoked it, so that it can output the appropriate setenv/export
commands. This does not seem to be correct. I'm happy to do the work
to change it to something else but I'd like to figure out what that
something else should be.
As far as I can tell there is no automatic way to tell what type shell
invoked you and so any solution would actually require that that be
passed explicitly, ala dircolors,
F
> One approach to the actual problem coming to mind is to evaluate,
> wether $shell is set:
>
> PARENTSHELL="$SHELL"
> if [ ! -z "$shell" ]; then
> PARENTSHELL="$shell"
> fi
> case "$PARENTSHELL" in
> ...
>
> or, to require setting SHELL when using lesspipe (man page, shell
> comment change):
>
> SHELL=sh eval lesspipe
>
> (dunno csh equivalent)
>
>
> Cheers,
> Markus
>
> - - - - - - - - - - - - - - - - - - -
> Dipl. Ing. Markus Hitter
> http://www.jump-ing.de/
>
>
>
>
>
More information about the Ubuntu-devel-discuss
mailing list