Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ridiculousfish
Copy link
Member

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_commandline override point because it's now invoked from three places, so it makes sense to keep the behavior centralized.

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.
@ridiculousfish
Copy link
Member Author

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?

@zanchey
Copy link
Member

zanchey commented Feb 7, 2018

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.)

@krader1961
Copy link
Contributor

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.

@zx8
Copy link

zx8 commented Feb 8, 2018

I wonder if other committers feel the same?

I'm not a committer, but a long-time fish user and bash refugee.

I personally much prefer the current/new ^C behaviour because it makes it very obvious that you pressed CTRL-C (and not e.g. a kill-* keybind). I've also been known to accidentally fat-finger CTRL-C on occasion, losing the entirety of a long command I've painstakingly typed out, with no way of recovering it (i.e. it's not added to history).

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.

@obfuscated
Copy link

@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.

@mqudsi
Copy link
Contributor

mqudsi commented Mar 6, 2018

I changed my mind and I'm with @ridiculousfish on this one. The ^C at the end of a "cancelled" line seems... wrong in fish.

@ridiculousfish
Copy link
Member Author

ridiculousfish commented Mar 8, 2018

@obfuscated
screen shot 2018-03-07 at 10 21 28 pm

the ^C is the brightest thing in the window, that's what I find distracting.

@krader1961
Copy link
Contributor

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 __fish_cancel_commandline function that provides behavior closer to what experienced CLI users might want. The current behavior seems friendlier to me to people not wholly comfortable with a shell CLI.

@faho
Copy link
Member

faho commented May 11, 2018

No activity here in quite a while, so I'm closing.

@faho faho closed this May 11, 2018
justinmayer added a commit to justinmayer/dotfiles that referenced this pull request Sep 11, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants