Add `powerline-reload-config` command

This commit is contained in:
ZyX 2014-12-13 14:12:22 +03:00
parent 029dc92da0
commit 0898a692e9
2 changed files with 10 additions and 0 deletions

View File

@ -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)

View File

@ -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)"