-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
scalar parameter ZSH_DEBUG_CMD created globally in function _zsh_highlight error #438
Labels
Comments
Lyn Jay wrote on Wed, 12 Jul 2017 09:39 -0700:
_zsh_highlight:87: scalar parameter ZSH_DEBUG_CMD created globally in function _zsh_highlight
I can reproduce this when I set ZSH_DEBUG_CMD=: and install a DEBUG trap and z-sy-h is enabled (which enables warncreateglobal for its scope). Can someone come up with a minimal reproducer for this?
_edit_: That's `zsh -f` + `trap : DEBUG; source zsh-syntax-highlighting.zsh` + `<type anything>`.
build_prompt:1: scalar parameter RETVAL created globally in function build_prompt
This one is something in your configuration. Whoever uses $RETVAL needs to declare it with `typeset`.
|
Minimal reproducer in zsh -f f() { setopt local_options warn_create_global; :; }; trap : DEBUG; f Seems like an upstream issue. You can work around this by adding local ZSH_DEBUG_CMD as the first line in |
I confirm that workers/42043 fixes both the minimal reproducer and the original bug. |
... but it hasn't been committed upstream yet. Once that happens I think we can close this issue. |
workers/42043 has been committed to master in zsh-users/zsh@b476d89. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when i source .zshrc
the shell log like below:
i don't know why
The text was updated successfully, but these errors were encountered: