mirror of
https://github.com/powerline/powerline.git
synced 2025-07-26 07:16:31 +02:00
parent
de064558a1
commit
1451b4261f
@ -112,7 +112,7 @@ use ``c.Powerline.KEY``. Supported ``KEY`` strings or keyword argument names:
|
|||||||
a dictionary where keys are theme names and values are dictionaries which
|
a dictionary where keys are theme names and values are dictionaries which
|
||||||
will be recursively merged with the contents of the given theme.
|
will be recursively merged with the contents of the given theme.
|
||||||
|
|
||||||
``paths``
|
``config_paths``
|
||||||
Sets directories where configuration should be read from. If present, no
|
Sets directories where configuration should be read from. If present, no
|
||||||
default locations are searched for configuration. No expansions are
|
default locations are searched for configuration. No expansions are
|
||||||
performed thus you cannot use paths starting with ``~/``.
|
performed thus you cannot use paths starting with ``~/``.
|
||||||
|
@ -72,7 +72,7 @@ class ConfigurableIPythonPowerline(IPythonPowerline):
|
|||||||
config = ip.config.Powerline
|
config = ip.config.Powerline
|
||||||
self.config_overrides = config.get('config_overrides')
|
self.config_overrides = config.get('config_overrides')
|
||||||
self.theme_overrides = config.get('theme_overrides', {})
|
self.theme_overrides = config.get('theme_overrides', {})
|
||||||
self.paths = config.get('paths')
|
self.config_paths = config.get('config_paths')
|
||||||
super(ConfigurableIPythonPowerline, self).init()
|
super(ConfigurableIPythonPowerline, self).init()
|
||||||
|
|
||||||
def do_setup(self, ip, shutdown_hook):
|
def do_setup(self, ip, shutdown_hook):
|
||||||
|
@ -95,10 +95,10 @@ class PowerlinePrompt2(PowerlinePromptOut):
|
|||||||
|
|
||||||
|
|
||||||
class ConfigurableIPythonPowerline(IPythonPowerline):
|
class ConfigurableIPythonPowerline(IPythonPowerline):
|
||||||
def init(self, config_overrides=None, theme_overrides={}, paths=None):
|
def init(self, config_overrides=None, theme_overrides={}, config_paths=None):
|
||||||
self.config_overrides = config_overrides
|
self.config_overrides = config_overrides
|
||||||
self.theme_overrides = theme_overrides
|
self.theme_overrides = theme_overrides
|
||||||
self.paths = paths
|
self.config_paths = config_paths
|
||||||
super(ConfigurableIPythonPowerline, self).init()
|
super(ConfigurableIPythonPowerline, self).init()
|
||||||
|
|
||||||
def ipython_magic(self, ip, parameter_s=''):
|
def ipython_magic(self, ip, parameter_s=''):
|
||||||
|
@ -32,8 +32,8 @@ class IPythonPowerline(Powerline):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def get_config_paths(self):
|
def get_config_paths(self):
|
||||||
if self.paths:
|
if self.config_paths:
|
||||||
return self.paths
|
return self.config_paths
|
||||||
else:
|
else:
|
||||||
return super(IPythonPowerline, self).get_config_paths()
|
return super(IPythonPowerline, self).get_config_paths()
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ class TestConfig(TestCase):
|
|||||||
from powerline.ipython import IPythonPowerline
|
from powerline.ipython import IPythonPowerline
|
||||||
|
|
||||||
class IpyPowerline(IPythonPowerline):
|
class IpyPowerline(IPythonPowerline):
|
||||||
paths = None
|
config_paths = None
|
||||||
config_overrides = None
|
config_overrides = None
|
||||||
theme_overrides = {}
|
theme_overrides = {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user