Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ctrl+D support to ssh and user_drv #983

Closed
wants to merge 1 commit into from

Conversation

josevalim
Copy link
Contributor

It works similar to the shell in Unix systems and
in many languages where Ctrl+D will shut the system
down if the current line is empty (i.e. no text before
nor after the current cursor position).

If there is text after, it will be deleted as previously.
If there is text before, a beep sound will be emitted.

In case of remote nodes, it won't shut down the remote node.

It works similar to the shell in Unix systems and
in many languages where Ctrl+D will shut the system
down if the current line is empty (i.e. no text before
nor after the current cursor position).

If there is text after, it will be deleted as previously.
If there is text before, a beep sound will be emitted.
@psyeugenic
Copy link
Contributor

I wonder if I ever will have the courage to do a Ctrl+D in a to_erl screen after this change.

@josevalim
Copy link
Contributor Author

@psyeugenic yeah, I get the feeling. One possible alternative is to show one of Ctrl+C or Ctrl+G menus. We can just close this as well. :D

@psyeugenic
Copy link
Contributor

I'm sorry to say but I can't get in line with this change. I see your point of consistency but ..

I can actually envision an entire citys cell service going down with this change.

A veteran Erlang DevOps arrives at a site to lend a hand. He does some work at a designated console and hits Ctrl+D to detach when he's done. It's the routine. The Operator in charge says: "Yeah, we didn't actually have a pipe on that console." DevOps: "But it closed.."
Seconds later. Loud alarm bells chimes and big red lights flashes angrily. The operator does not look amused.

@josevalim
Copy link
Contributor Author

Oh, I completely see what you mean now. When using to_erl, Ctrl+D is used on purpose to close the pipe. I thought in your earlier comment you were simply referring to accidentally closing it. I agree with you, this is a bad idea™. I am closing this but at least now we have a reference if folks ask "why can't I close the repl using Ctrl+D".

@josevalim josevalim closed this Mar 3, 2016
@eproxus
Copy link
Contributor

eproxus commented Jan 4, 2017

Continued discussion here: https://bugs.erlang.org/browse/ERL-331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants