diff --git a/docs/source/configuration/local.rst b/docs/source/configuration/local.rst index 01545fb6..527f9650 100644 --- a/docs/source/configuration/local.rst +++ b/docs/source/configuration/local.rst @@ -81,12 +81,13 @@ are taken from zsh variables. but only subdictionaries for ``THEME_NAME`` key are merged with theme configuration when theme with given name is requested. -``POWERLINE_CONFIG_PATH`` - Sets directory where configuration should be read from. If present, no +``POWERLINE_CONFIG_PATHS`` + Sets directories where configuration should be read from. If present, no default locations are searched for configuration. No expansions are performed by powerline script itself, but zsh usually performs them on its - own if you set variable without quotes: ``POWERLINE_CONFIG_PATH=~/example``. - Expansion depends on zsh configuration. + own if you set variable without quotes: ``POWERLINE_CONFIG_PATHS=( ~/example + )``. You should use array parameter or the usual colon-separated + ``POWERLINE_CONFIG_PATHS=$HOME/path1:$HOME/path2``. Ipython overrides ================= diff --git a/powerline/bindings/zsh/__init__.py b/powerline/bindings/zsh/__init__.py index 2bbf3184..444490b5 100644 --- a/powerline/bindings/zsh/__init__.py +++ b/powerline/bindings/zsh/__init__.py @@ -5,6 +5,7 @@ import zsh import atexit from powerline.shell import ShellPowerline from powerline.lib import parsedotval +from powerline.lib.unicode import unicode used_powerlines = [] @@ -44,9 +45,14 @@ class Args(object): @property def config_path(self): try: - return zsh.getvalue('POWERLINE_CONFIG_PATH') + ret = zsh.getvalue('POWERLINE_CONFIG_PATHS') except IndexError: return None + else: + if isinstance(ret, (unicode, str, bytes)): + return ret.split(type(ret)(':')) + else: + return ret @property def jobnum(self):