mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-10 18:29:50 +00: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:
@@ -22,7 +22,7 @@ less_termcap[ue]="${reset_color}"
|
||||
0="${${(M)0:#/*}:-$PWD/$0}"
|
||||
|
||||
# Absolute path to this file's directory.
|
||||
typeset __colored_man_pages_dir="${0:A:h}"
|
||||
typeset -g __colored_man_pages_dir="${0:A:h}"
|
||||
|
||||
function colored() {
|
||||
local -a environment
|
||||
|
||||
Reference in New Issue
Block a user