Skip to content

Commit c9183ce

Browse files
committed
Always bind keys
1 parent 5592506 commit c9183ce

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: templates/zsh.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ if [[ -o zle ]]; then
103103
# Show completions for Space-Tab.
104104
# shellcheck disable=SC2086
105105
__zoxide_result="$(\command zoxide query --exclude "$(__zoxide_pwd || \builtin true)" --interactive -- ${words[2,-1]})" || __zoxide_result=''
106-
# Sends '\e[0n' to console input.
106+
107+
# Bind '\e[0n' to helper function.
108+
\builtin bindkey '\e[0n' '__zoxide_z_complete_helper'
109+
# Send '\e[0n' to console input.
107110
\builtin printf '\e[5n'
108111
fi
109112

@@ -124,7 +127,6 @@ if [[ -o zle ]]; then
124127
}
125128
\builtin zle -N __zoxide_z_complete_helper
126129

127-
\builtin bindkey '\e[0n' '__zoxide_z_complete_helper'
128130
[[ "${+functions[compdef]}" -ne 0 ]] && \compdef __zoxide_z_complete {{ cmd }}
129131
fi
130132

0 commit comments

Comments
 (0)