summaryrefslogtreecommitdiff
path: root/shell/completion.bash
diff options
context:
space:
mode:
authorAjeet D'Souza <98ajeet@gmail.com>2025-05-09 23:29:27 -0700
committerGitHub <noreply@github.com>2025-05-10 15:29:27 +0900
commitb81696fb64a5c01a33d789312c47a7834f02430e (patch)
treecacc481081d74e6337671f670ad8ef40078b0532 /shell/completion.bash
parentd226d841a1f2b849b7e3efab2a44ecbb3e61a5a5 (diff)
downloadfzf-b81696fb64a5c01a33d789312c47a7834f02430e.tar.gz
bash: set keybinding right before printing special character (#4377)
Diffstat (limited to 'shell/completion.bash')
-rw-r--r--shell/completion.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/completion.bash b/shell/completion.bash
index 48f1a547..11a46b9d 100644
--- a/shell/completion.bash
+++ b/shell/completion.bash
@@ -31,9 +31,6 @@ if [[ $- =~ i ]]; then
###########################################################
-# To redraw line after fzf closes (printf '\e[5n')
-bind '"\e[0n": redraw-current-line' 2> /dev/null
-
__fzf_defaults() {
# $1: Prepend to FZF_DEFAULT_OPTS_FILE and FZF_DEFAULT_OPTS
# $2: Append to FZF_DEFAULT_OPTS_FILE and FZF_DEFAULT_OPTS
@@ -328,6 +325,8 @@ __fzf_generic_path_completion() {
else
COMPREPLY=( "$cur" )
fi
+ # To redraw line after fzf closes (printf '\e[5n')
+ bind '"\e[0n": redraw-current-line' 2> /dev/null
printf '\e[5n'
return 0
fi
@@ -384,6 +383,7 @@ _fzf_complete() {
else
COMPREPLY=("$cur")
fi
+ bind '"\e[0n": redraw-current-line' 2> /dev/null
printf '\e[5n'
return 0
else