readline icon indicating copy to clipboard operation
readline copied to clipboard

Ctrl+Z on Windows completely breaks readline.

Open AlexMax opened this issue 7 years ago • 4 comments

Pretty simple. If I type Ctrl+Z at a Readline() on Windows, the line I was working on disappears along with the prompt and no keyboard input has any effect anymore aside from Ctrl+C, which kills the program and barfs whatever I typed in after hitting Ctrl+Z to the command prompt.

AlexMax avatar Sep 23 '16 00:09 AlexMax

same on Linux...

i4ki avatar Oct 03 '16 18:10 i4ki

Hi, @tiago4orion I tested in Centos 6, it works as expected. So, can you describe in detail?

chzyer avatar Oct 04 '16 01:10 chzyer

Hi @chzyer

It works as expected, but not in the way I would expect... The problem is that my shells don't have job control (it doesn't make sense in my use cases) and there's no way to disable the CTRL-Z key binding in the readline... Then, if someone press CTRL-Z my process is suspended and there's no session leader to manage it, then the shell breaks completely (loses the tty, no way to recover).

What do I expect? An option to disable CTRL-Z, or only suspend when it knows there's a session leader to manage it...

i4ki avatar Oct 04 '16 15:10 i4ki

@tiago4orion ok, fair enough, I will add an option to disable it.

chzyer avatar Oct 05 '16 10:10 chzyer