[Bash-completion-devel] Expect buffering fixes
Crestez Dan Leonard
cdleonard at gmail.com
Thu Feb 25 22:49:02 UTC 2010
On Wed, 2010-02-24 at 22:45 +0100, Freddy Vulto wrote:
> This is the thread:
>
> http://www.mail-archive.com/bug-bash@gnu.org/msg07023.html
Very useful, posting there was a good idea.
> Looks like we can/should use this for bash-4:
>
> echo 'set echo-control-characters on' >> ~/.inputrc
> bind 'set echo-control-characters on'
>
> but need another solution for bash-3. I did a short try with the workaround,
> like this:
>
> # Send QUIT/INT
> send \031
> send \003
> send "sync001"
> expect -re ".*sync001$prompt$"
If you send something immediately after an interrupt then it should be
part of the next command, right? I tried to send sync _before_ the ^C
and that simply didn't show up in the output. I guess there are some
strange race conditions in this region.
I pushed a new attempt at this in the expect-fixes branch. It first
matches a random string then the new prompt as distinct stages. This
seems to avoid races. Link to code: http://alturl.com/tf7u
Please test this; it was broken before.
More information about the Bash-completion-devel
mailing list