diff --git a/debian/changelog b/debian/changelog index 2f059136..13612e28 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ byobu (5.6) unreleased; urgency=low * usr/lib/byobu/ip_address: - user@host and ipaddress need some separation, as they're hard to differentiate when next to one another + * usr/bin/byobu-ctrl-a: LP: #922951 + - if the user has already chosen an escape sequence, don't run the + interactive byobu-ctrl-a program [ Ryan Thompson ] * usr/bin/byobu-select-session: LP: #919391 diff --git a/usr/bin/byobu-ctrl-a b/usr/bin/byobu-ctrl-a index f4bed34c..98ad4fbf 100755 --- a/usr/bin/byobu-ctrl-a +++ b/usr/bin/byobu-ctrl-a @@ -34,6 +34,10 @@ bind_to="" keybindings="$BYOBU_CONFIG_DIR/keybindings" touch "$keybindings" +# If the user has already chosen an escape sequence, then +# presumably they want ctrl-a to operate in emacs mode +grep -qs "^escape" "$keybindings" && bind_to="emacs" + case "${1}" in -h|--help) Usage; exit 0;; screen) bind_to="screen";; @@ -66,7 +70,7 @@ done case "$bind_to" in emacs) - $SED -i -e "/^register a /d" -e "/^bindkey \"^A\"/d" -e "/^escape /d" "$keybindings" + $SED -i -e "/^register a /d" -e "/^bindkey \"^A\"/d" -e "/^escape escape \^Aa/d" "$keybindings" echo 'bindkey "^A"' >> "$keybindings" echo "INFO: ctrl-a will now operate in emacs mode" echo > "$keybindings.tmux"