diff --git a/debian/changelog b/debian/changelog index 97693890..ba8a7bbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ -byobu (5.10) unreleased; urgency=low +byobu (5.10-0ubuntu1) precise; urgency=low - * UNRELEASED + * usr/bin/byobu-ctrl-a: LP: #931345 + - fix ctrl-a support for tmux 1.5 and 1.6 - -- Dustin Kirkland Sun, 12 Feb 2012 11:07:46 -0600 + -- Dustin Kirkland Tue, 14 Feb 2012 14:37:47 -0600 byobu (5.9-0ubuntu1) precise; urgency=low diff --git a/usr/bin/byobu-ctrl-a b/usr/bin/byobu-ctrl-a index 21aed3a1..4e10c735 100755 --- a/usr/bin/byobu-ctrl-a +++ b/usr/bin/byobu-ctrl-a @@ -78,7 +78,7 @@ case "$bind_to" in $BYOBU_BACKEND -X at 0 source "$BYOBU_CONFIG_DIR/profile" ;; tmux) - $BYOBU_SED -i -e "/^set -g prefix /d" -e "/ send-prefix/d" -e "/^unbind-key -n C-a/d" "$keybindings" + $BYOBU_SED -i -e "/^set -g prefix/d" -e "/ send-prefix/d" -e "/^unbind-key -n C-a/d" "$keybindings" echo "set -g prefix F12" >> "$keybindings" echo "unbind-key -n C-a" >> "$keybindings" $BYOBU_BACKEND source "$BYOBU_PREFIX/share/byobu/profiles/tmuxrc" @@ -96,9 +96,16 @@ case "$bind_to" in $BYOBU_BACKEND -X at 0 source "$BYOBU_CONFIG_DIR/profile" ;; tmux) - $BYOBU_SED -i -e "/^set -g prefix /d" -e "/ send-prefix/d" -e "/^unbind-key -n C-a/d" "$keybindings" + $BYOBU_SED -i -e "/^set -g prefix/d" -e "/ send-prefix/d" -e "/^unbind-key -n C-a/d" "$keybindings" echo "unbind-key -n C-a" >> "$keybindings" - echo "set -g prefix ^A,F12" >> "$keybindings" + if $BYOBU_BACKEND -V | grep " 1.5"; then + # tmux 1.5 supports a list of prefixes + echo "set -g prefix ^A,F12" >> "$keybindings" + else + # tmux 1.6 and above supports prefix and prefix2 + echo "set -g prefix ^A" >> "$keybindings" + echo "set -g prefix2 ^A" >> "$keybindings" + fi echo "bind a send-prefix" >> "$keybindings" $BYOBU_BACKEND source "$BYOBU_PREFIX/share/byobu/profiles/tmuxrc" ;;