diff --git a/debian/changelog b/debian/changelog index 48584bb9..2f059136 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ byobu (5.6) unreleased; urgency=low [ Ryan Thompson ] * usr/bin/byobu-select-session: LP: #919391 - read only integers + * usr/bin/byobu-select-session: LP: #908944 + - use attach_session function -- Dustin Kirkland Wed, 18 Jan 2012 19:57:15 -0600 diff --git a/usr/bin/byobu-select-session b/usr/bin/byobu-select-session index 93bc5077..e8742662 100755 --- a/usr/bin/byobu-select-session +++ b/usr/bin/byobu-select-session @@ -73,6 +73,7 @@ def attach_session(session): print("Attaching: [%s]\n" % session) update_environment(session) backend, session_name = session.split("____", 2) + # must use the binary, not the wrapper! if backend == "tmux": os.execvp("tmux", ["", "-2", "attach", "-t", session_name]) else: @@ -114,11 +115,8 @@ if len(sessions) > 1: choice = "" sys.stderr.write("\nERROR: Invalid input\n"); elif len(sessions) == 1: - # Attach to the only session; must use the binary, not the wrapper! - if BYOBU_BACKEND == "tmux": - os.execvp("tmux", ["", "-2", "attach"]) - else: - os.execvp("screen", ["", "-AOxRR"]) + # Auto-select the only session + choice = 1 if choice: if sessions[choice-1] == "NEW":