-
-
Notifications
You must be signed in to change notification settings - Fork 171
Description
What do you want?
As title, pressing Backspace when navigating through history should insert current line and delete chars from last char, just like default behavior of most shells.
Additionally, I hope that the gray semicolon at the end of the history commands is not displayed. (Related discussion: #324 #361 , but I may not need multi-select.)
Why do you want this?
For those who are just starting to use zsh-autocomplete
, its behavior is consistent with the default behavior of bash, zsh, etc., thereby reducing the learning curve for users.
Who else would benefit from this?
Same as above.
How should it work?
Given the following situation:
- Use arrow up to open history menu, navigate to any entry.
When I perform the following steps:
- Press Backspace.
Then I expect the following to happen:
- I should be able to delete the last char of command, not the virtual semicolon.
Tries
I added bindkey -M menuselect -s '^?' ' ^?^?'
to my .zshrc and let suf=( )
in Completions/_autocomplete__history_lines
, and it almost worked as I wanted. The only issue is the space used to accept line will make cursor move right, while ^?
*2 make it left, which is not smooth.