Closed avalonwilliams closed 5 years ago
When I setopt WARN_CREATE_GLOBAL
with your patch, zsh
warns
_agkozak_branch_status:27: scalar parameter k created globally in function _agkozak_branch_status
Usually the warning flashes for a split second; it causes the left prompt to be displayed twice.
I think that means that zsh
will perceive $k
to be global unless we tell it otherwise; that's why I wrote the code the way I did.
I was not aware of this functionality of the shell, sorry.
'k' was implicitly declared in the for loop, and isn't used outside of it. I noticed this while making some modifications to an offline copy of the theme, so I decided to open a PR.