From 16bf16478c1a474b42f66018a4e9c2f171d26e49 Mon Sep 17 00:00:00 2001 From: ZyX Date: Tue, 6 Jan 2015 16:19:47 +0300 Subject: [PATCH] Rename `POWERLINE_CONFIG` to `POWERLINE_CONFIG_OVERRIDES` Fixes #1124 Ref #1126 --- docs/source/configuration/local.rst | 9 +++++---- powerline/bindings/zsh/__init__.py | 2 +- tests/test_shells/input.zsh | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/source/configuration/local.rst b/docs/source/configuration/local.rst index 720e8eb7..9b687d6b 100644 --- a/docs/source/configuration/local.rst +++ b/docs/source/configuration/local.rst @@ -73,7 +73,7 @@ Zsh/zpython overrides Here overrides are controlled by similarly to the powerline script, but values are taken from zsh variables. -``POWERLINE_CONFIG`` +``POWERLINE_CONFIG_OVERRIDES`` Overrides options from :file:`powerline/config.json`. Should be a zsh associative array with keys equal to ``KEY.NESTED_KEY`` and values being JSON strings. Pair ``KEY.KEY1 VALUE`` is equivalent to ``{"KEY": {"KEY1": @@ -83,9 +83,10 @@ are taken from zsh variables. ``POWERLINE_THEME_CONFIG`` Overrides options from :file:`powerline/themes/shell/*.json`. Should be a zsh associative array with keys equal to ``THEME_NAME.KEY.NESTED_KEY`` and - values being JSON strings. Is processed like the above ``POWERLINE_CONFIG``, - but only subdictionaries for ``THEME_NAME`` key are merged with theme - configuration when theme with given name is requested. + values being JSON strings. Is processed like the above + ``POWERLINE_CONFIG_OVERRIDES``, but only subdictionaries for ``THEME_NAME`` + key are merged with theme configuration when theme with given name is + requested. ``POWERLINE_CONFIG_PATHS`` Sets directories where configuration should be read from. If present, no diff --git a/powerline/bindings/zsh/__init__.py b/powerline/bindings/zsh/__init__.py index a7795bbd..a54c6cfd 100644 --- a/powerline/bindings/zsh/__init__.py +++ b/powerline/bindings/zsh/__init__.py @@ -37,7 +37,7 @@ class Args(object): @property def config(self): - return get_var_config('POWERLINE_CONFIG') + return get_var_config('POWERLINE_CONFIG_OVERRIDES') @property def theme_option(self): diff --git a/tests/test_shells/input.zsh b/tests/test_shells/input.zsh index b0dfe82d..44f74e1b 100644 --- a/tests/test_shells/input.zsh +++ b/tests/test_shells/input.zsh @@ -8,8 +8,8 @@ if test -z "$POWERLINE_NO_ZSH_ZPYTHON" ; then powerline-reload-config } function set_theme() { - typeset -A POWERLINE_CONFIG - POWERLINE_CONFIG=( + typeset -A POWERLINE_CONFIG_OVERRIDES + POWERLINE_CONFIG_OVERRIDES=( ext.shell.theme $1 ) powerline-reload-config @@ -23,7 +23,7 @@ else } fi source powerline/bindings/zsh/powerline.zsh -typeset -gA POWERLINE_CONFIG POWERLINE_THEME_CONFIG +typeset -gA POWERLINE_CONFIG_OVERRIDES POWERLINE_THEME_CONFIG set_theme_option default_leftonly.segment_data.hostname.args.only_if_ssh false set_theme_option default.segment_data.hostname.args.only_if_ssh false set_theme default_leftonly