-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatability with WARN_CREATE_GLOBAL zsh option #101
Comments
ratijas
changed the title
compatability with WARN_CREATE_GLOBAL zsh option
Compatability with WARN_CREATE_GLOBAL zsh option
Nov 24, 2020
ratijas
added a commit
to ratijas/k
that referenced
this issue
Nov 24, 2020
WARN_CREATE_GLOBAL zsh option didn't like it: k:138: scalar parameter K_COLOR_DI created globally in function k k:139: scalar parameter K_COLOR_LN created globally in function k ... Closes supercrabtree#101
ratijas
added a commit
to ratijas/dotfiles
that referenced
this issue
Nov 24, 2020
WARN_CREATE_GLOBAL zsh option didn't like it: k:138: scalar parameter K_COLOR_DI created globally in function k k:139: scalar parameter K_COLOR_LN created globally in function k ... Related issue: supercrabtree/k#101
Could you take a look, please? |
ping @supercrabtree |
@supercrabtree are you alive? |
henlo darkness my old friend |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Global variables should be declared with
typeset -g
option. Partially for documentation purposes, but also becauseWARN_CREATE_GLOBAL
zsh option doesn't like it any other way:Alternatives
How about switching to an associative array (a.k.a. dictionary/hash-table) instead of a bunch of independent variables? I have successfully done this in oh-my-zsh plugin once: ohmyzsh/ohmyzsh#9437
The text was updated successfully, but these errors were encountered: