diff --git a/powerline/bindings/zsh/__init__.py b/powerline/bindings/zsh/__init__.py index a5cf05e6..e489b744 100644 --- a/powerline/bindings/zsh/__init__.py +++ b/powerline/bindings/zsh/__init__.py @@ -190,6 +190,11 @@ def reload(): powerline.reload() +def reload_config(): + for powerline in used_powerlines.values(): + powerline.create_renderer(load_main=True, load_colors=True, load_colorscheme=True, load_theme=True) + + def setup(zsh_globals): powerline = ZshPowerline() powerline.setup(zsh_globals) diff --git a/powerline/bindings/zsh/powerline.zsh b/powerline/bindings/zsh/powerline.zsh index f869cccd..43b2521e 100644 --- a/powerline/bindings/zsh/powerline.zsh +++ b/powerline/bindings/zsh/powerline.zsh @@ -129,6 +129,11 @@ _powerline_setup_prompt() { zpython '_powerline_reload()' zpython 'del _powerline_reload' } + powerline-reload-config() { + zpython 'from powerline.bindings.zsh import reload_config as _powerline_reload_config' + zpython '_powerline_reload_config()' + zpython 'del _powerline_reload_config' + } else if test -z "${POWERLINE_COMMAND}" ; then POWERLINE_COMMAND="$($POWERLINE_CONFIG shell command)"