* usr/bin/byobu-ctrl-a: LP: #1045070

- check if the user has already chosen an escape sequence and if so,
    don't bother them with the ctrl-a question
This commit is contained in:
Dustin Kirkland 2013-05-07 17:15:06 -05:00
commit 908dac6152
2 changed files with 21 additions and 1 deletions

3
debian/changelog vendored
View file

@ -28,6 +28,9 @@ byobu (5.38) unreleased; urgency=low
on an off on an off
- useful when Shift-F12 is not usable (Linux console tty), and - useful when Shift-F12 is not usable (Linux console tty), and
when ctrl-a-! is not usable (tmux) when ctrl-a-! is not usable (tmux)
* usr/bin/byobu-ctrl-a: LP: #1045070
- check if the user has already chosen an escape sequence and if so,
don't bother them with the ctrl-a question
[ Reinhard Tartler ] [ Reinhard Tartler ]
* usr/bin/byobu-reconnect-sockets, usr/lib/byobu/include/shutil: LP: #1162432 * usr/bin/byobu-reconnect-sockets, usr/lib/byobu/include/shutil: LP: #1162432

View file

@ -37,7 +37,24 @@ touch "$keybindings"
# If the user has already chosen an escape sequence, then # If the user has already chosen an escape sequence, then
# presumably they want ctrl-a to operate in emacs mode # presumably they want ctrl-a to operate in emacs mode
grep -qs "^escape" "$keybindings" && bind_to="emacs" case "$BYOBU_BACKEND" in
"screen")
if grep -qs "^escape" "$keybindings"; then
# Check for escape definition in local keybindings config
bind_to="emacs"
fi
;;
"tmux")
if grep -qs "^set -g prefix" "$keybindings"e; then
# Check for escape definition in local keybindings config
bind_to="emacs"
fi
# Check for some other escape sequence in tmux keys
if tmux list-keys | grep -qs "^bind-key\s\+[^a]\s\+send-prefix"; then
bind_to="emacs"
fi
;;
esac
case "${1}" in case "${1}" in
-h|--help) Usage; exit 0;; -h|--help) Usage; exit 0;;