mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-22 04:45:14 +00:00
Do not set key bindings in non-interactive shell
This commit is contained in:
parent
2b8c2b9f2a
commit
4396ab7548
3
install
3
install
@ -95,6 +95,8 @@ EOF
|
||||
cat >> $src << "EOF"
|
||||
# Key bindings
|
||||
# ------------
|
||||
if [[ $- =~ i ]]; then
|
||||
|
||||
# Required to refresh the prompt after fzf
|
||||
bind '"\er": redraw-current-line'
|
||||
|
||||
@ -113,6 +115,7 @@ bind '"\C-t": " \C-u \C-a\C-k$(__fsel)\e\C-e\C-y\C-a\C-y\ey\C-h\C-e\er"'
|
||||
# CTRL-R - Paste the selected command from history into the command line
|
||||
bind '"\C-r": " \C-e\C-u$(HISTTIMEFORMAT= history | fzf +s | sed \"s/ *[0-9]* *//\")\e\C-e\er"'
|
||||
|
||||
fi
|
||||
EOF
|
||||
else
|
||||
cat >> $src << "EOF"
|
||||
|
Loading…
Reference in New Issue
Block a user