fzf overrides the Bash’s Ctrl+T hotkey (^T
), used to swap characters. I want to return to the default Bash functionality.
When the fzf’s keybindings have been enabled (in .bashrc
, see the snippet below), hitting Ctrl+T runs find
on the system drive and opens the output in fzf.
# fzf on Fedora
if [ -x "$(command -v fzf)" ]
then
source /usr/share/fzf/shell/key-bindings.bash
fi
$ sed '17,31!d' /usr/share/fzf/shell/key-bindings.bash
# Key bindings
# ------------
__fzf_select__() {
local cmd opts
cmd="${FZF_CTRL_T_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type f -print \
-o -type d -print \
-o -type l -print 2> /dev/null | command cut -b3-"}"
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse --scheme=path ${FZF_DEFAULT_OPTS-} ${FZF_CTRL_T_OPTS-} -m"
eval "$cmd" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" |
while read -r item; do
printf '%q ' "$item" # escape special chars
done
}
Should I edit the file /usr/share/fzf/shell/key-bindings.bash
or is there a safer way to resolve the conflict?
I’m currently running fzf 0.44.1
, release 1.fc39
.