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: Ctrl+F to complete one character at a time #4984
Comments
Doesn't right arrow already do that? And alt+right completes a single word. You could just add a binding? |
No, it apparently has the same behavior as Ctrl+E. I also would like to avoid using the arrow keys as I don't generally take my hands off the home row.
So it does. Is there an alternative that doesn't use an arrow key? This would actually be useful for me, as would character-wise completion in some circumstances.
Ah I'll read up on that when I have time, thanks for the response :) |
Yeah, bindings should address your concerns. They're really easy to use, too :) |
|
You can use emacs shortcuts, e.g. Alt+F for completing one word. |
@cskrisz That inserts a little ƒ symbol for me, in Iterm2 at least. I would love to have fully featured Emacs-style completion/navigation though :) |
@m-cat For iTerm2, in Preferences > Profiles > Keys you can set the option key to Esc+ to use it as Meta. You can set the left and right key separately so you can still type special characters if you want. |
@cskrisz Cool beans -- thanks!
Hmm, don't think I ever needed to type a special character in the terminal :) |
Yes, this is fairly annoying and feels inconsistent given that
How would the binding look like? |
Adding my support to this feature request. I already use the |
This allows users to add custom keybindings to autocomplete only one character at a time. Resolves #4984
Adding a summary for posterity: There is no default keybinding to complete a single character at the time. However, you can create your own binding by typing the following command in the shell: bind \cf forward-single-char # Complete a single char when pressing Ctrl+F or: bind \e\[C forward-single-char # Complete a single char when pressing right arrow To get you desired keybinding in every session, add one of the above lines to your |
Nice, thank you very much for your efforts. It is unfortunate that the solution will not be the default -- "this breaks existing behavior" is a bad argument for not fixing behavior that is obviously faulty. This change is an obvious improvement, and if the right people had chimed in on your contribution, this would have been the default. It's too bad I wasn't aware of that PR. |
This allows users to add custom keybindings to autocomplete only one character at a time. Resolves fish-shell/fish-shell#4984
Hi, thanks for Fish. Love it.
Let's say I start typing out
fish --
and the completion forfish --version
pops up. If I pressCtrl+E
, the entire line is completed. PressingCtrl+F
does the same thing. I was wondering if we couldn't makeCtrl+F
do something different: complete one character at a time.For another example, if I type out
cargo
the completion appears forcargo test --features="use-mock-routing" -- --nocapture
. Well, sometimes I just want thecargo test
orcargo test --features
part, so completion character-by-character would be useful to have. It also would be consistent withCtrl+E
going to end of line andCtrl+F
going one character forward in many editors.I think this would be an easy change to make the "friendly interactive shell" a tiny bit friendlier :)
The text was updated successfully, but these errors were encountered: