usr/bin/byobu-select-session: fix create-a-new-session on

select-session dialog, LP: #550808
This commit is contained in:
Dustin Kirkland 2010-03-31 15:12:55 -05:00
commit ee921559a1
2 changed files with 10 additions and 3 deletions

2
debian/changelog vendored
View file

@ -1,6 +1,8 @@
byobu (2.67) unreleased; urgency=low byobu (2.67) unreleased; urgency=low
* Close LP: #528967, which was also fixed by the last upload * Close LP: #528967, which was also fixed by the last upload
* usr/bin/byobu-select-session: fix create-a-new-session on
select-session dialog, LP: #550808
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 30 Mar 2010 00:56:18 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Tue, 30 Mar 2010 00:56:18 -0500

View file

@ -20,6 +20,7 @@
import commands, os, sys import commands, os, sys
SHELL = os.getenv("SHELL", "/bin/bash")
sessions = [] sessions = []
choice = "" choice = ""
sessions.append(0) sessions.append(0)
@ -54,6 +55,10 @@ if i > 1:
sys.stderr.write("\nERROR: Invalid input\n"); sys.stderr.write("\nERROR: Invalid input\n");
if choice: if choice:
if choice == i-1:
# Create a new session
os.execv("/usr/bin/byobu", ["", SHELL])
else:
# Attach to the chosen session # Attach to the chosen session
os.execv("/usr/bin/byobu", ["", "-x", sessions[choice]]) os.execv("/usr/bin/byobu", ["", "-x", sessions[choice]])
else: else: