From 21c3ecdb2f02a0f8c139796be73d9a6da9a2fdc7 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sat, 3 May 2025 19:31:11 +0900 Subject: [PATCH] Remove unused parameter in Bash integration The variable "result" is a local variable, so it is not visible from the global context where the command bound by "bind -x" is executed. In the first place, the argument is not used by "__zoxide_z_complete_helper". This patch removes the reference to the variable "${result}". --- templates/bash.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/bash.txt b/templates/bash.txt index 61b041f..7f725c3 100644 --- a/templates/bash.txt +++ b/templates/bash.txt @@ -157,8 +157,7 @@ if [[ ${BASH_VERSINFO[0]:-0} -eq 4 && ${BASH_VERSINFO[1]:-0} -ge 4 || ${BASH_VER elif [[ -z ${COMP_WORDS[-1]} ]]; then # shellcheck disable=SC2312 __zoxide_result="$(\command zoxide query --exclude "$(__zoxide_pwd)" --interactive -- "{{ "${COMP_WORDS[@]:1:${#COMP_WORDS[@]}-2}" }}")" && { - # shellcheck disable=SC2016 - \builtin bind -x '"\e[0n": __zoxide_z_complete_helper "${result}"' + \builtin bind -x '"\e[0n": __zoxide_z_complete_helper' \builtin printf '\e[5n' } fi