-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Control-C to simply clear the line again #4713
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
Conversation
In commit 5f849d0, issue fish-shell#2904, the control-C behavior was changed to print an inverted ^C and then a newline. This behavior has not been well-received, judging by positive reactions for how to undo it. This commit resets the behavior to the original behavior of clearing the command line.
41b8661 to
642c135
Compare
|
Speaking personally I can't stand the current ^C behavior. The inverted background is loud and distracting: it's bad from a design perspective. It's the first thing I disable on any new machine - I wonder if other committers feel the same? |
|
I'm not willing to admit mistake, so I never push Ctrl-C. (No strong feelings, although with my terminal colours I don't appear to get an inverted background anyway.) |
|
FWIW, I have a slight preference for the old behavior. I only implemented the current behavior because @obfuscated and some other people wanted the bash behavior. And at the time it seemed like being compatible with bash, where that didn't otherwise conflict with fish goals, was preferred. Do you really want to make another gratuitous change? There was extensive discussion in issue #2904. And neither of the issues you linked to seem to support reverting this behavior. |
I'm not a committer, but a long-time I personally much prefer the current/new That said, it doesn't really bother me if this were to be reverted as I can simply re-revert the behaviour to the current behaviour by defining the function in my user config. |
|
@ridiculousfish What do you mean by loud and distracting? You just have one extra line in your output. Why does this bother you? I guess, I could teach myself to press "home, #, enter" instead of just ctrl-c. |
|
I changed my mind and I'm with @ridiculousfish on this one. The |
|
the ^C is the brightest thing in the window, that's what I find distracting. |
That is intentional AFAICT. It's to make it obvious to someone not comfortable with the behavior of [ctrl-C] (or whatever your interrupt key is) that the command was abandoned. I'm personally not a fan of that behavior because I'm a grey beard. But there was extensive discussion and different behaviors explored before the current behavior was settled on. In fact, I recall that a couple of individuals who I don't normally agree with argued for the current behavior. Finally, the behavior is trivial to change for people like you and me who don't like it although it would be nice if how to do so was documented. Including an alternative to the default |
|
No activity here in quite a while, so I'm closing. |

In commit 5f849d0, issue #2904, the control-C behavior was changed to
print an inverted ^C and then a newline. This behavior has not been well-received, judging by positive reactions for how to undo it (1, 2.
This resets the behavior to the original behavior of clearing the command line. It keeps the
__fish_cancel_commandlineoverride point because it's now invoked from three places, so it makes sense to keep the behavior centralized.