From 0b54abf859fa716d75c146e1812b57aa0e5951da Mon Sep 17 00:00:00 2001 From: slowsage <84777606+slowsage@users.noreply.github.com> Date: Mon, 8 Aug 2022 19:01:54 -0400 Subject: [PATCH] remove quotes for command evaluation and COMPREPLY in bash.txt --- templates/bash.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/bash.txt b/templates/bash.txt index 175f5ba..c7fbb35 100644 --- a/templates/bash.txt +++ b/templates/bash.txt @@ -82,7 +82,7 @@ function __zoxide_z() { else \builtin local result # shellcheck disable=SC2312 - result="$(\command zoxide query --exclude "$(__zoxide_pwd)" -- "$@")" && + result=$(\command zoxide query --exclude "$(__zoxide_pwd)" -- "$@") && __zoxide_cd "${result}" fi } @@ -90,7 +90,7 @@ function __zoxide_z() { # Jump to a directory using interactive search. function __zoxide_zi() { \builtin local result - result="$(\command zoxide query -i -- "$@")" && __zoxide_cd "${result}" + result=$(\command zoxide query -i -- "$@") && __zoxide_cd "${result}" } {{ section }} @@ -133,8 +133,8 @@ if [[ ${BASH_VERSINFO[0]:-0} -eq 4 && ${BASH_VERSINFO[1]:-0} -ge 4 || ${BASH_VER elif [[ -z ${COMP_WORDS[-1]} ]]; then \builtin local result # shellcheck disable=SC2312 - result="$(\command zoxide query --exclude "$(__zoxide_pwd)" -i -- "{{ "${COMP_WORDS[@]:1:${#COMP_WORDS[@]}-2}" }}")" && - COMPREPLY=("${__zoxide_z_prefix}${result}/") + result=$(\command zoxide query --exclude "$(__zoxide_pwd)" -i -- "{{ "${COMP_WORDS[@]:1:${#COMP_WORDS[@]}-2}" }}") && + COMPREPLY=${__zoxide_z_prefix}${result}/ \builtin printf '\e[5n' fi }