From a891a52c1784d3d69e13216979f23bcc63ad0d99 Mon Sep 17 00:00:00 2001 From: "Rishi K." Date: Fri, 8 Nov 2024 13:14:57 +0530 Subject: [PATCH] fix(Bash:TabCompletion): use `command` builtin to avoid potential issues with aliases or functions for `bash` program - Using `command` builtin ensures that the `bash` command is executed directly, avoiding potential issues with aliases or functions. - Change version from 'v2.3.6' to 'v2.3.6+dev'. --- navita.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/navita.sh b/navita.sh index 0865012..a17fbac 100644 --- a/navita.sh +++ b/navita.sh @@ -60,7 +60,7 @@ export NAVITA_HISTORYFILE="${NAVITA_DATA_DIR}/navita-history" export NAVITA_FOLLOW_ACTUAL_PATH="${NAVITA_FOLLOW_ACTUAL_PATH:-n}" export NAVITA_COMMAND="${NAVITA_COMMAND:-cd}" export NAVITA_HISTORY_LIMIT="${NAVITA_HISTORY_LIMIT:-100}" -export NAVITA_VERSION="v2.3.6" +export NAVITA_VERSION="v2.3.6+dev" export NAVITA_CONFIG_DIR="${NAVITA_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/navita}" export NAVITA_IGNOREFILE="${NAVITA_CONFIG_DIR}/navita-ignore" export NAVITA_RELATIVE_PARENT_PATH="${NAVITA_RELATIVE_PARENT_PATH:-y}" @@ -925,7 +925,7 @@ if [[ -n "${BASH_VERSION}" ]]; then __navita::Completions::CompleteDirectory() { local dir_select if dir_select="$( compgen -o bashdefault -d -- "${curr_word}" | \ - "${navita_depends["fzf"]}" --prompt='❯ ' --info='inline: ❮ ' --info-command='echo -e "\x1b[33;1m${FZF_INFO%%/*}\x1b[m/${FZF_INFO##*/} Directory completion « Navita"' --height "40%" --tiebreak=begin,index --select-1 --exit-0 --exact --layout=reverse --query="${COMP_WORDS[COMP_CWORD]}" --bind=tab:down,btab:up --cycle --preview-window=down --border=bold --preview="bash -c '${navita_depends["ls"]} -CFaA --color=always -- \"\${1/#~/${HOME}}\"' -- {}" )"; then + "${navita_depends["fzf"]}" --prompt='❯ ' --info='inline: ❮ ' --info-command='echo -e "\x1b[33;1m${FZF_INFO%%/*}\x1b[m/${FZF_INFO##*/} Directory completion « Navita"' --height "40%" --tiebreak=begin,index --select-1 --exit-0 --exact --layout=reverse --query="${COMP_WORDS[COMP_CWORD]}" --bind=tab:down,btab:up --cycle --preview-window=down --border=bold --preview="command bash -c '${navita_depends["ls"]} -CFaA --color=always -- \"\${1/#~/${HOME}}\"' -- {}" )"; then dir_select="${dir_select}/" fi