matchai / spacefish

🚀🐟 The fish shell prompt for astronauts
https://spacefish.matchai.dev
MIT License
962 stars 79 forks source link

Spacefish prompt derps on ^C for prematurely aborted commands #50

Closed Snuggle closed 6 years ago

Snuggle commented 6 years ago

Bug Report

Current Behavior If you use ^C (Ctrl + C) to prematurely cancel a command before you run it, the prompt somewhat derps out and overwrites the last line.

Expected Behavior The prompt would not overwrite the last line and it would look perfect.

Environment

Possible Solution Add an extra new line to make sure text doesn't get overwritten.

Additional context/Screenshots asciicast

matchai commented 6 years ago

Hey Snuggle!

Though I am unable to reproduce the issue on my config, it looks like this issue matches one that has been opened in fish-shell: https://github.com/fish-shell/fish-shell/issues/3537

Hopefully this will be addressed in a future fish release. 😅

Snuggle commented 6 years ago

Do you have a fix for this in your own fish config, since this is default behavior for 2.7.1, or do you use a single-line prompt?

matchai commented 6 years ago

I'm not completely sure why this doesn't happen on my machine. I'm running 2.7.1 with a two-line prompt. I'm thinking it may be due to how iTerm handles repainting.

I have a pretty lightweight fish.config, so I don't think I inadvertently fixed it. 🤔