mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
style: declare globals properly
By default, `typeset` defines variables locally unless in the main scope. This is specially bad when using `omz plugin load`, which happens inside a function, so the declared variables don't continue being defined when the function finishes and the main scope reappears.
This commit is contained in:
parent
31d63ea884
commit
d3bb52d7d8
11 changed files with 12 additions and 12 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Completion
|
||||
fpath+=("${rvm_path}/scripts/zsh/Completion")
|
||||
|
||||
declare -A _comps
|
||||
typeset -g -A _comps
|
||||
autoload -Uz _rvm
|
||||
_comps[rvm]=_rvm
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue