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,10 +111,11 @@ def source_tmux_files(pl, args):
version = get_tmux_version(pl) version = get_tmux_version(pl)
for fname, priority in sorted(get_tmux_configs(version), key=(lambda v: v[1])): for fname, priority in sorted(get_tmux_configs(version), key=(lambda v: v[1])):
run_tmux_command('source', fname) run_tmux_command('source', fname)
cmd = deduce_command() if not os.environ.get('POWERLINE_COMMAND'):
if cmd: cmd = deduce_command()
run_tmux_command('set-environment', '-g', 'POWERLINE_COMMAND', deduce_command()) if cmd:
run_tmux_command('refresh-client') run_tmux_command('set-environment', '-g', 'POWERLINE_COMMAND', deduce_command())
run_tmux_command('refresh-client')
def create_powerline_logger(args): def create_powerline_logger(args):