[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#363250: general: Custom PAGER gives error on sid, but works on sarge

On 23 Apr 2006, Loïc Minier verbalised:

> On Sun, Apr 23, 2006, Manoj Srivastava wrote:
>> Since allowing pipelines seems to be the motivating factor
>> here, we do need to solve that, I think.
> Yes, indeed, the root of the problem is the change of support for
> pipelines.  However, I'm not sure that pipelines worked in the use
> case of passing a file as a parameter to $PAGER in the past.
> Currently, each program (for example man) has its way of calling
> $PAGER, perhaps as "$PAGER <file name>" or piping to "sh -c
> "$PAGER"", or perhaps piping directly to "$PAGER".
> Of course, if we say $PAGER can be a pipeline, and a pager can be
> used both as "$PAGER <file name>" and as the end of a pipeline, then
> defining $PAGER to be a pipeline must work in both cases, but I'm
> not sure it is a regression to not support pipelines in the use case
> of a file name as argument.
> In other words:
> $PAGER is a             $PAGER is a
> program                 pipeline
> ====================================================================
> call $PAGER as                 works                   ???
> $PAGER <file name>
> ====================================================================
> call $PAGER as
> cat <data> | $PAGER            works                   works
> I do agree that the two use cases that you listed in a previous
> message exist, I'm not sure they were both supported in the case
> where $PAGER is a pipeline, but we can work on fixing that at least
> in sensible-pager by using systematically: cat "$@" | $PAGER

        Historically, if my memory serves me correctly, one used PAGER
 to specify the program, and the default arguments. PAGER essentially
 worked as an shell alias:
PAGER= less -cim
 And then you could either pipe thigs to ti, or call it on a file.  I
 am not sure if I recall a-pipeline-as-pager ever working, even way
 back in the mid 80's.

It is sweet to let the mind unbend on occasion. Quintus Horatius
Flaccus (Horace)
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

Reply to: