8000 Have ctrl-c trigger redraw prompt line · Issue #6394 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

Have ctrl-c trigger redraw prompt line #6394

@ktm5j

Description

@ktm5j

Hi Folks

I wanted to suggest an "enhancement". I frequently scroll back up through my terminal output while viewing the output of past commands... with bash and other shells I could simply hit ctrl-c as a simple (and generally safe) way of returning to the bottom. However if you hit ctrl-c in fish, it doesn't kill the prompt line and draw a new one like bash, and so it does not tell my terminal emulator that there's been input and it should scroll back down.

Now I don't think fish should adopt the same behavior that bash has, as it wastes a line of output space. However if you could redraw the active prompt line over top of itself (instead of drawing a new one) then I think that should trigger my terminal to scroll down.

The other ways of getting my terminal to scroll back to the prompt are: 1. Hitting enter (dangerous!), 2. Typing text (passing input, could cause unwanted effects if there's a program waiting for input) or 3. Hitting the 'up' arrow (still passing input).

Does anyone else think this would be useful? I'd be happy to write the code if there's interest. It seems to me like this change wouldn't break anything or affect users.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0