Skip to content
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

Closed
manajay opened this issue Jul 12, 2017 · 5 comments
Labels

Comments

@manajay
Copy link

manajay commented Jul 12, 2017

when i source .zshrc
the shell log like below:

_zsh_highlight:87: scalar parameter ZSH_DEBUG_CMD created globally in function _zsh_highlight
build_prompt:1: scalar parameter RETVAL created globally in function build_prompt
 manajay@manajay  ~ 
_zsh_highlight:90: scalar parameter ZSH_DEBUG_CMD created globally in function _zsh_highlight
build_prompt:1: scalar parameter RETVAL created globally in function build_prompt
 manajay@manajay  ~ 
_zsh_highlight:94: scalar parameter ZSH_DEBUG_CMD created globally in function _zsh_highlight
build_prompt:1: scalar parameter RETVAL created globally in function build_prompt
 manajay@manajay  ~ 
_zsh_highlight:95: scalar parameter ZSH_DEBUG_CMD created globally in function _zsh_highlight
build_prompt:1: scalar parameter RETVAL created globally in function build_prompt

i don't know why

@danielshahaf
Copy link
Member

danielshahaf commented Jul 12, 2017 via email

@phy1729
Copy link
Member

phy1729 commented Nov 15, 2017

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 _zsh_highlight.

@danielshahaf
Copy link
Member

I confirm that workers/42043 fixes both the minimal reproducer and the original bug.

@danielshahaf
Copy link
Member

... but it hasn't been committed upstream yet. Once that happens I think we can close this issue.

@phy1729
Copy link
Member

phy1729 commented Jan 18, 2018

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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants