stty echo in ash

David Byron dbyron at hheld.com
Thu Jul 27 15:40:46 UTC 2006


On Wed, Jul 26, 2006, Rich Felker wrote: 

> The settings chosen by stty will not affect an interactive shell,
> since it must replace them with appropriate interactive settings for
> reading input (at least if line editing is enabled). Whenever you run
> a command, the user-set stty settings are restored, and if the command
> changes them, they're saved again before the shell prompt appears and
> puts the terminal back into interactive mode.
> 
> BTW, assuming you have line editing enabled, echo is not being
> enabled. Rather, the code in cmdedit.c is displaying the character it
> received.
> 
> Is there a reason you expect or need it to work differently?

I expected it to work differently because ash and bash on my desktop linux
machine work this way.

I need it to work differently for the regular expressions in a bunch of
dejagnu/expect scripts to match command output properly.  Currently they
include the echoed command as well.

Any suggestions for how to do this?  It looks like it takes a code change.
There's a putchar(c) call in cmdedit_set_out_char that looks like the one
I'd like to wrap in a conditional.  Not sure what a reasonable conditional
is.  Any ideas there?

Thanks much for your help.

-DB




More information about the busybox mailing list