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}".
This commit is contained in:
parent
891fa79e06
commit
21c3ecdb2f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue