* usr/lib/byobu/menu: LP: #881993

- merge, and update a little
  - make sure we get the second-to-last byte on that line
This commit is contained in:
Dustin Kirkland 2013-01-15 19:24:15 -06:00
commit 7c261b60e5
2 changed files with 5 additions and 1 deletions

3
debian/changelog vendored
View file

@ -10,6 +10,9 @@ byobu (5.28) unreleased; urgency=low
- fix some bad problems introduced by single quotes - fix some bad problems introduced by single quotes
- escape double quotes instead - escape double quotes instead
- clean up keybindings file with better sed's - clean up keybindings file with better sed's
* usr/lib/byobu/menu: LP: #881993
- merge, and update a little
- make sure we get the second-to-last byte on that line
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 14 Jan 2013 15:27:36 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Mon, 14 Jan 2013 15:27:36 -0600

View file

@ -27,7 +27,8 @@ __menu() {
local bindings esc key text local bindings esc key text
[ -r "$BYOBU_CONFIG_DIR/keybindings" ] && bindings="$BYOBU_CONFIG_DIR/keybindings" || bindings="$HOME/.screenrc" [ -r "$BYOBU_CONFIG_DIR/keybindings" ] && bindings="$BYOBU_CONFIG_DIR/keybindings" || bindings="$HOME/.screenrc"
if grep -qs "^source.*screen-escape-keys$" $bindings 2>/dev/null || grep -qs "^source.*f-keys.screen.disable$" $bindings 2>/dev/null || [ "$1" = "--disable-f-keys" ]; then if grep -qs "^source.*screen-escape-keys$" $bindings 2>/dev/null || grep -qs "^source.*f-keys.screen.disable$" $bindings 2>/dev/null || [ "$1" = "--disable-f-keys" ]; then
esc=`grep "^escape" $bindings | $BYOBU_SED "s/.*^\(.\).*/\1/"` # Get the second to last byte from the "escape" option
esc=`grep "^escape" $bindings | tail -c 3 | head -c 1`
[ -n "$esc" ] && key="^$esc-@" || key="^a-@" [ -n "$esc" ] && key="^$esc-@" || key="^a-@"
elif grep -qs "^source.*none$" $bindings 2>/dev/null; then elif grep -qs "^source.*none$" $bindings 2>/dev/null; then
key="byobu-config" key="byobu-config"