Depending on the application used it is possible to override configuration. Here is the list:
Vim configuration can be overridden using the following options:
This variable may be set to either 0 or 1. If it is set to 1 then Vim will save log in g:powerline_log_messages variable in addition to whatever was configured in log_* options. Level is always log_level, same for format.
Warning
This variable is deprecated. Use log_file option in conjunction with powerline.vim.VimVarHandler class and Vim config overrides variable. Using this is also the only variant to make saving into the environment variable the only place where log is saved or save into different variable.
Powerline script has a number of options controlling powerline behavior. Here VALUE always means “some JSON object”.
Overrides options from powerline/config.json. KEY.KEY2.KEY3=VALUE is a shortcut for KEY={"KEY2": {"KEY3": VALUE}}. Multiple options (i.e. -c K1=V1 -c K2=V2) are allowed, result (in the example: {"K1": V1, "K2": V2}) is recursively merged with the contents of the file.
If VALUE is omitted then corresponding key will be removed from the configuration (if it was present).
Overrides options from powerline/themes/ext/THEME_NAME.json. KEY.NESTED_KEY=VALUE is processed like described above, {ext} is the first argument to powerline script. May be passed multiple times.
If VALUE is omitted then corresponding key will be removed from the configuration (if it was present).
Warning
Such overrides are suggested for testing purposes only. Use Environment variables overrides for other purposes.
All bindings that use POWERLINE_COMMAND environment variable support taking overrides from environment variables. In this case overrides should look like the following:
OVERRIDE='key1.key2.key3=value;key4.key5={"value":1};key6=true;key1.key7=10'
. This will be parsed into
{
"key1": {
"key2": {
"key3": "value"
},
"key7": 10,
},
"key4": {
"key5": {
"value": 1,
},
},
"key6": True,
}
. Rules:
The following environment variables may be used for overrides according to the above rules:
Overrides values from powerline/themes/ext/key.json. Top-level key is treated as a name of the theme for which overrides are used: e.g. to disable cwd segment defined in powerline/themes/shell/default.json one needs to use:
POWERLINE_THEME_OVERRIDES=default.segment_data.cwd.display=false
Additionally one environment variable is a usual colon-separated list of directories: POWERLINE_CONFIG_PATHS. This one defines paths which will be searched for configuration. Empty paths in POWERLINE_CONFIG_PATHS are ignored.
Note
Overrides from environment variables have lower priority then Powerline script overrides. Latter are suggested for tests only.
Here overrides are controlled by similarly to the powerline script, but values are taken from zsh variables. Environment variable overrides are also supported: if variable is a string this variant is used.
Ipython overrides depend on ipython version. Before ipython-0.11 additional keyword arguments should be passed to setup() function. After ipython-0.11 c.Powerline.KEY should be used. Supported KEY strings or keyword argument names:
In addition to the above configuration options $POWERLINE_COMMAND environment variable can be used to tell shell or tmux to use specific powerline implementation and $POWERLINE_CONFIG_COMMAND to tell zsh or tmux where powerline-config script is located. This is mostly useful for putting powerline into different directory.
Note
$POWERLINE_COMMAND is always treated as one path in shell bindings, so path with spaces in it may be used. To specify additional arguments one may use $POWERLINE_COMMAND_ARGS, but note that this variable exists for testing purposes only and may be removed. One should use Environment variable overrides instead.
To disable prompt in shell, but still have tmux support or to disable tmux support environment variables $POWERLINE_NO_{SHELL}_PROMPT and $POWERLINE_NO_{SHELL}_TMUX_SUPPORT can be used (substitute {SHELL} with the name of the shell (all-caps) that should be affected (e.g. BASH) or use all-inclusive SHELL that will disable support for all shells). These variables have no effect after configuration script was sourced (in fish case: after powerline-setup function was run). To disable specific feature support set one of these variables to some non-empty value.
In order to keep shell prompt, but avoid launching Python twice to get unused above lines in tcsh $POWERLINE_NO_TCSH_ABOVE or $POWERLINE_NO_SHELL_ABOVE variable should be set.
In order to remove additional space from the end of the right prompt in fish that was added in order to support multiline prompt $POWERLINE_NO_FISH_ABOVE or $POWERLINE_NO_SHELL_ABOVE variable should be set.
Like shell bindings PDB bindings take overrides from environment variables.