mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* usr/bin/byobu-config: LP: #1166058
- handle non-existant keybindings file
This commit is contained in:
parent
b252172b32
commit
a3b575654c
2 changed files with 14 additions and 8 deletions
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -8,6 +8,8 @@ byobu (5.40) unreleased; urgency=low
|
|||
- hardcode a use of gawk (for hex calculations)
|
||||
* usr/share/doc/byobu/help.tmux.txt: LP: #1143342
|
||||
- rephrase window rename help text
|
||||
* usr/bin/byobu-config: LP: #1166058
|
||||
- handle non-existant keybindings file
|
||||
|
||||
-- Dustin Kirkland <kirkland@ubuntu.com> Tue, 07 May 2013 22:01:40 -0500
|
||||
|
||||
|
|
|
@ -265,16 +265,20 @@ def getesckey():
|
|||
line = ""
|
||||
if BYOBU_BACKEND == "tmux":
|
||||
path = BYOBU_CONFIG_DIR + '/keybindings.tmux'
|
||||
for l in open(path):
|
||||
if l.startswith("set -g prefix "):
|
||||
line = l
|
||||
if os.path.exists(path):
|
||||
for l in open(path):
|
||||
if l.startswith("set -g prefix "):
|
||||
line = l
|
||||
else:
|
||||
return DEF_ESC
|
||||
else:
|
||||
path = BYOBU_CONFIG_DIR + '/keybindings'
|
||||
for l in open(path):
|
||||
if l.startswith("escape "):
|
||||
line = l
|
||||
if not os.path.exists(path):
|
||||
return DEF_ESC
|
||||
if os.path.exists(path):
|
||||
for l in open(path):
|
||||
if l.startswith("escape "):
|
||||
line = l
|
||||
else:
|
||||
return DEF_ESC
|
||||
if line == "":
|
||||
return DEF_ESC
|
||||
esc = line[line.find('^') + 1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue