Merge lp:~hyperair/byobu/fix-reuse-sessions-inverted-logic into lp:byobu

Proposed by Chow Loong Jin on 2020-05-25
Status: Needs review
Proposed branch: lp:~hyperair/byobu/fix-reuse-sessions-inverted-logic
Merge into: lp:byobu
Diff against target: 14 lines (+2/-2)
1 file modified
usr/lib/byobu/include/select-session.py (+2/-2)
To merge this branch: bzr merge lp:~hyperair/byobu/fix-reuse-sessions-inverted-logic
Reviewer Review Type Date Requested Status
Dustin Kirkland  2020-05-25 Pending
Review via email: mp+384507@code.launchpad.net

Description of the change

The reuse_sessions logic is inverted -- I have ~/.byobu/.reuse-session present, but byobu's select-sessions.py is calling tmux with "new-session .... set-option destroy-unattached". This merge request fixes that logic.

To post a comment you must log in.

Unmerged revisions

2644. By Chow Loong Jin on 2020-05-25

Fix inverted logic for reuse_sessions in select-session.py

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'usr/lib/byobu/include/select-session.py'
2--- usr/lib/byobu/include/select-session.py 2020-02-09 16:35:32 +0000
3+++ usr/lib/byobu/include/select-session.py 2020-05-25 15:30:37 +0000
4@@ -133,9 +133,9 @@
5 # must use the binary, not the wrapper!
6 if backend == "tmux":
7 if reuse_sessions:
8+ os.execvp("tmux", ["tmux", "-u", "attach", "-t", session_name])
9+ else:
10 os.execvp("tmux", ["tmux", "-u", "new-session", "-t", session_name, ";", "set-option", "destroy-unattached"])
11- else:
12- os.execvp("tmux", ["tmux", "-u", "attach", "-t", session_name])
13 else:
14 os.execvp("screen", ["screen", "-AOxRR", session_name])
15

Subscribers

People subscribed via source and target branches