Skip to content

Commit

Permalink
chore: Update the default value of ZSH_BASH_COMPLETIONS_FALLBACK_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu authored and 3v1n0 committed Jan 19, 2024
1 parent da560de commit 41ef0b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zsh-bash-completions-fallback.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function _bash_completions_fetch_supported_commands {
setopt extended_glob typeset_silent no_short_loops
unsetopt nomatch

local bash_completions=${ZSH_BASH_COMPLETIONS_FALLBACK_PATH:-/usr/share/bash-completion}
local bash_completions=${ZSH_BASH_COMPLETIONS_FALLBACK_PATH:-${${(@s/:/)${XDG_DATA_DIRS:-/usr/share}}[1]}/bash-completion}
local -a dirs=(
${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions
)
Expand Down Expand Up @@ -91,7 +91,7 @@ function _bash_completions_fetch_supported_commands {
}

function _bash_completions_load {
local bash_completions=${ZSH_BASH_COMPLETIONS_FALLBACK_PATH:-/usr/share/bash-completion}
local bash_completions=${ZSH_BASH_COMPLETIONS_FALLBACK_PATH:-${${(@s/:/)${XDG_DATA_DIRS:-/usr/share}}[1]}/bash-completion}
local reserved_words=(
"do"
"done"
Expand Down

0 comments on commit 41ef0b9

Please sign in to comment.