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

Feature request: Support a couple of subtle fish-like behaviors(Ctrl-C, multiline comamnds) #2830

Open
hashinclude opened this issue Feb 13, 2025 · 1 comment

Comments

@hashinclude
Copy link

Hey,

I recently moved to zsh from fish (non-POSIX compliance was causing issues).
p10k was awesome because it gave me almost the same behavior out of the box!

There are few very small differences that still get in my way -

  1. Ctrl-C:
    In fish, the behavior is like this -
    if command running
    send SIGINT
    else
    clear line (don't start a new one)

However, out of the box, in zsh, it leaves the current prompt and starts a new one.
eg: https://unix.stackexchange.com/questions/376153/how-can-one-override-bash-ctrlc-to-be-more-fish-like

  1. Handling of "" and "" on multiline commands
    In fish, if I have a multiline command like this -
    $ echo a
    b
    And if I move the cursor to after '', and press , it creates a new line in between, instead of running the command.

Do you think these are features that can be supported by p10k?

@romkatv
Copy link
Owner

romkatv commented Feb 13, 2025

Powerlevel10k defines prompt and nothing else. See https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#which-aspects-of-shell-and-terminal-does-powerlevel10k-affect

The features you've described can be implemented in zsh and they don't require any support from p10k. For the first, you might find it better to change your habits: use Ctrl-C to kill processes, and use Ctrl-U to clear the command line in zsh. For the second feature, you might find this plugin useful (also mine): https://github.com/romkatv/zsh-no-ps2.

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

No branches or pull requests

2 participants