Skip to content

Commit

Permalink
fix(Bash:TabCompletion): use command builtin to avoid potential iss…
Browse files Browse the repository at this point in the history
…ues 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'.
  • Loading branch information
CodesOfRishi committed Nov 8, 2024
1 parent 11219a1 commit a891a52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions navita.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit a891a52

Please sign in to comment.