mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
* usr/bin/byobu-select-session: LP: #908944
- use attach_session function
This commit is contained in:
parent
2289dd7db3
commit
1df4743ad6
2 changed files with 5 additions and 5 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -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
|
||||
|
||||
|
|
|
@ -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":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue