mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 03:19:01 +00:00
[bash] Fix CTRL-R to preserve the latest yank
Close #1216 1. Append a single space so that step 3 won't fail 2. CTRL-E to move to the end of the line 3. CTRL-U to delete the whole line before the cursor 4. CTRL-Y to paste the deleted line 5. ESC+Y to rotate the kill ring and bring back the previous yank before step 3 6. CTRL-U to delete the whole line again 7. Paste `__fzf_history__` 8. ESC+CTRL-E to expand the command substitution 9. ESC+R to redraw the line 10. ESC+^ to expand the history entry (!NUMBER)
This commit is contained in:
parent
417bca03df
commit
3f868fd792
@ -80,7 +80,7 @@ if [[ ! -o vi ]]; then
|
||||
fi
|
||||
|
||||
# CTRL-R - Paste the selected command from history into the command line
|
||||
bind '"\C-r": " \C-e\C-u`__fzf_history__`\e\C-e\er\e^"'
|
||||
bind '"\C-r": " \C-e\C-u\C-y\ey\C-u`__fzf_history__`\e\C-e\er\e^"'
|
||||
|
||||
# ALT-C - cd into the selected directory
|
||||
bind '"\ec": " \C-e\C-u`__fzf_cd__`\e\C-e\er\C-m"'
|
||||
|
Loading…
Reference in New Issue
Block a user