-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
Add ctrl n, p shortcuts, don't do anything with unknown control sequences #330
base: master
Are you sure you want to change the base?
Conversation
This would be really nice to have as ctrl+n and ctrl+p are common shortcuts in terminals (and vim) to cycle through options without having to reach out for arrow keys. It's also more common than #365 (BTW fzf also works with ctrl+n and ctrl+p). It also ignores ctrl sequences which currently add invisible characters to the prompt that must be deleted by pressing backspace so that's a great addition too. @terkelg is there anything missing in this PR for you? |
Hey @joeykilpatrick, do you know if the author of this package is still active? I noticed you merged the last PR but it hasn't been released |
I don't want to speak for @terkelg, but I think part of the hesitation for merging these nice-to-have PRs is that
For #1, this package needs a solution for adding this type of custom feature to a prompt type without having to include it in this package. One thought would be to implement something like For #2, this package needs a solution for testing, both for this package and for dependent packages. There was a There is an old 3.0 milestone that includes some of these solutions. I think this package needs to develop a roadmap for a 3.0 release that includes solutions to these issues, and more. I have expressed a willingness to dedicate time to developing these features. |
Thanks for taking the time to explain the situation. I understand the reluctance to merge new features without tests. Regarding this functionality being opinionated, I could be wrong but it seems to be a standard among shells to use ctrl p for previous and n for next (differently from using ctrl j or k which is a vim thing). Currently, doing a ctrl sequence still types that invisible ctrl sequence and backspace removes it. It should probably be ignored |
Unmerged changes of terkelg#330
I needed this so I released in a fork in the meantime: https://github.com/posva/prompts |
No description provided.