[Top][All Lists]

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

Re: [Bug-readline] Readline echoing on non-terminal input

From: Chet Ramey
Subject: Re: [Bug-readline] Readline echoing on non-terminal input
Date: Wed, 28 Mar 2012 11:58:51 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

On 3/22/12 12:21 PM, Ken Hornstein wrote:

> So I guess my questions are:
> - Is echoing supposed to be turned on when the input is not a tty?
>   I would have thought "no", but it seems like a concious decision
>   was made here to turn it on.

Yes, echoing is supposed to be turned on even when the input isn't a
tty (more precisely, when tcgetattr() fails).  This errs on the side of

> - Is there a way to get consistent echoing behavior when using readline 5
>   and readline 6?  I can live with one behavior (although I'd prefer
>   to have it turned off to match the non-readline test case) as
>   long as it's the same between readline versions.  It seems like
>   the right APIs aren't exposed to make it work.

There isn't an exposed global readline variable to do this.  Readline
sets it based on the terminal settings tcgetattr returns, defaulting,
as above, to on.  You might be able to inhibit this by detecting that
input is a pipe and installing a null redisplay function as the value
of rl_redisplay_function.

> --Ken
> _______________________________________________
> Bug-readline mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-readline

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]