From 11daf072443f3499b3ac213c4bea843e1074dc0d Mon Sep 17 00:00:00 2001 From: Aaron Kollasch Date: Sat, 3 Sep 2022 00:42:11 -0400 Subject: [PATCH] Fix interactive completion with zsh-autocomplete --- templates/zsh.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/zsh.txt b/templates/zsh.txt index 3abb781..0ea28da 100644 --- a/templates/zsh.txt +++ b/templates/zsh.txt @@ -109,17 +109,17 @@ if [[ -o zle ]]; then # shellcheck disable=SC2086,SC2312 if result="$(\command zoxide query --exclude "$(__zoxide_pwd)" -i -- ${words[2,-1]})"; then __zoxide_result="${result}" + \builtin local result="${__zoxide_z_prefix}${__zoxide_result}" + compadd -Q "${(q-)result}" else __zoxide_result='' + compadd "" fi \builtin printf '\e[5n' fi } function __zoxide_z_complete_helper() { - \builtin local result="${__zoxide_z_prefix}${__zoxide_result}" - # shellcheck disable=SC2296 - [[ -n "${__zoxide_result}" ]] && LBUFFER="${LBUFFER}${(q-)result}" \builtin zle reset-prompt }