Fix warncreateglobal warning from zsh_expand

This commit is contained in:
Foo 2017-05-01 02:15:50 +03:00
parent 2d877c9240
commit 343b217cae

View File

@ -111,7 +111,7 @@ if hasattr(zsh, 'expand') and zsh.expand('${:-}') == '':
zsh_expand = zsh.expand zsh_expand = zsh.expand
else: else:
def zsh_expand(s): def zsh_expand(s):
zsh.eval('_POWERLINE_REPLY="' + s + '"') zsh.eval('local _POWERLINE_REPLY="' + s + '"')
ret = zsh.getvalue('_POWERLINE_REPLY') ret = zsh.getvalue('_POWERLINE_REPLY')
zsh.setvalue('_POWERLINE_REPLY', None) zsh.setvalue('_POWERLINE_REPLY', None)
return ret return ret