Do not run `set-environment` in tmux if POWERLINE_COMMAND is set

This commit is contained in:
ZyX 2014-08-02 22:27:58 +04:00
parent ea7f3b6501
commit 4ddac2a2f5
1 changed files with 5 additions and 4 deletions

View File

@ -111,6 +111,7 @@ def source_tmux_files(pl, args):
version = get_tmux_version(pl)
for fname, priority in sorted(get_tmux_configs(version), key=(lambda v: v[1])):
run_tmux_command('source', fname)
if not os.environ.get('POWERLINE_COMMAND'):
cmd = deduce_command()
if cmd:
run_tmux_command('set-environment', '-g', 'POWERLINE_COMMAND', deduce_command())