Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Printing ^C, ^D key presses at end of prompt when pressed



On Feb 4,  2:03am, Philippe Troin wrote:
} Subject: Re: Printing ^C, ^D key presses at end of prompt when pressed
}
} bash-4.1$ stty echoctl
} bash-4.1$ ^C
} bash-4.1$ stty -echoctl
} bash-4.1$                  <--- Ctrl-C pressed, no output.
} 
} No such luck in zsh (stty echoctl has no effect).

I actually did try this in bash before writing my original response.
On the CentOS systems I have access to, echoctl makes no difference
whatsoever to bash.  OTOH, they don't have bash4, so maybe this is
something changed in readline at some point since bash3.  Or ...

} No such luck in zsh (stty echoctl has no effect).
} Coult it a spurious line redraw on ctrl-C (and others)?

Sorry, could you rephrase that?
 
} Note how echoctl still works in zsh when using the read builtin or
} just cat:
} 
} phil@air:~% stty echoctl
} phil@air:~% read
} ^C%
} zsh: exit 1
} phil@air:~% cat
} ^C

On what may be a third hand, I don't get *that* either.  I have echoctl
on all the time, but just to be doubly sure:

schaefer<511> STTY=echoctl cat 

schaefer<512> 

Maybe there's yet another stty option getting involved here?  Even with
bash3 I don't see the ^C when I interrupt cat.

And just for completeness:

schaefer<516> setopt printexitvalue
schaefer<517> read
zsh: exit 1
schaefer<518> STTY=echoctl cat       

zsh: interrupt  STTY=echoctl cat
schaefer<519> 



Messages sorted by: Reverse Date, Date, Thread, Author