mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 22:34:23 -07:00
* usr/bin/byobu-select-session: LP: #911500
- detect and avoid some circular byobu-inside-byobu infinite loops
This commit is contained in:
parent
db908e78d2
commit
f13586dc51
2 changed files with 8 additions and 0 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -25,6 +25,8 @@ byobu (5.6) unreleased; urgency=low
|
||||||
* usr/bin/byobu, usr/bin/byobu-janitor, usr/lib/byobu/disk_io,
|
* usr/bin/byobu, usr/bin/byobu-janitor, usr/lib/byobu/disk_io,
|
||||||
usr/lib/byobu/include/constants:
|
usr/lib/byobu/include/constants:
|
||||||
- use BYOBU_READLINK instead of READLINK
|
- use BYOBU_READLINK instead of READLINK
|
||||||
|
* usr/bin/byobu-select-session: LP: #911500
|
||||||
|
- detect and avoid some circular byobu-inside-byobu infinite loops
|
||||||
|
|
||||||
[ Ryan Thompson ]
|
[ Ryan Thompson ]
|
||||||
* usr/bin/byobu-select-session: LP: #919391
|
* usr/bin/byobu-select-session: LP: #919391
|
||||||
|
|
|
@ -117,6 +117,12 @@ if len(sessions) > 1:
|
||||||
elif len(sessions) == 1:
|
elif len(sessions) == 1:
|
||||||
# Auto-select the only session
|
# Auto-select the only session
|
||||||
choice = 1
|
choice = 1
|
||||||
|
if BYOBU_BACKEND == "tmux" and os.getenv("TMUX"):
|
||||||
|
sys.stderr.write("ERROR: Sessions should be nested with care. Unset $TMUX to force.\n")
|
||||||
|
sys.exit(1)
|
||||||
|
elif BYOBU_BACKEND == "screen" and re.match("screen", os.getenv("TERM")):
|
||||||
|
sys.stderr.write("ERROR: Sessions should be nested with care. Remove 'screen' from $TERM to force.\n")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if choice:
|
if choice:
|
||||||
if sessions[choice-1] == "NEW":
|
if sessions[choice-1] == "NEW":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue