Is the invisible text bug in bash a bug or a feature?

8

1

On every single linux distribution I have used the last 10 years there has been the following inconvenience: You run a program in the terminal using bash. After the program is stopped or interrupted, whatever you type sometimes appears invisible. You can then enter the command "reset" and the screen is cleared and the cursor is visible again.

Because of this bug, I always changed shell to zsh whenever I login to a new terminal for the first time. In zsh the invisible text bug never happens. Since the bug now has been there for over 10 years now I've begun to suspect that it is a feature of bash. So, can anyone tell me what it's good for?

Also, where is the bash home page/bug tracker actually located. Bash.org seems to be about "IT bashing", and so does the #bash irc channel. Why do most linux distributions include a shell which is so hard to give feedback to, when several alternatives is at least as good?

Jonas

Posted 2011-05-15T18:56:44.450

Reputation:

1So... which part of your question is programming-related again? – Ignacio Vazquez-Abrams – 2011-05-15T19:01:45.303

2Please direct me to the correct place to ask. The irony is that a google search on "bash shell bug tracker" currently leads to this page. – None – 2011-05-15T19:21:54.833

That's what happen when you cat binary files... – Yab – 2011-05-16T06:50:19.987

Answers

11

That's only mean than in zsh you cannot do something like:

stty -echo     #turn off echoing what you type
stty echo      #turn on echoing
reset          #reset terminal to the default state

In bash, the above command works as expected - turn off echoing of command. Just tried in zsh - does not work. Who has a bug? ;)

Turning off echoing is possible achieve with ESC sequences, so if your program randomly send binary sequences to terminal, {or when you CTRL-\ some screen oriented program),it behaves sometimes like stty -echo and you must reset it. It is not a bug - simply it is how terminals (and terminal emulators) works.

What is strange, why in zsh stty -echo does not works.

jm666

Posted 2011-05-15T18:56:44.450

Reputation: 807

2In zsh, you can ttyctl -f to disallow changes to the terminal modes, and ttyctl -u to allow them. – None – 2011-05-15T20:14:22.233