* usr/bin/byobu-select-session: LP: #908944

- use attach_session function
This commit is contained in:
Dustin Kirkland 2012-01-25 16:57:15 -06:00
commit 1df4743ad6
2 changed files with 5 additions and 5 deletions

2
debian/changelog vendored
View file

@ -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 <kirkland@ubuntu.com> Wed, 18 Jan 2012 19:57:15 -0600

View file

@ -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":