Skip to content

Commit

Permalink
Avoid global/nested var warning in compdef
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonrichert committed Nov 22, 2021
1 parent 41bed13 commit dacf6aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/.autocomplete.compinit
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ builtin autoload -RUz is-at-least

typeset -gHa _autocomplete__compdef=()
compdef() {
_autocomplete__compdef+=( "${(j: :)${(@q+)@}}" )
typeset -gHa _autocomplete__compdef=( $_autocomplete__compdef[@] "${(j: :)${(@q+)@}}" )
}

[[ -v functions[_bash_complete] ]] ||
Expand Down

0 comments on commit dacf6aa

Please sign in to comment.