From 3b13ef5a38e796ff095883b2082adbcd05cadc5b Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 9 Nov 2011 14:27:52 -0600 Subject: [PATCH] * usr/bin/byobu-status-detail, usr/lib/byobu/.constants, usr/share/byobu/keybindings/f-keys.tmux: - set a BYOBU_PAGER environment variable - use BYOBU_PAGER in places we need a pager --- debian/changelog | 4 ++++ usr/bin/byobu-status-detail | 3 +-- usr/lib/byobu/.constants | 1 + usr/share/byobu/keybindings/f-keys.tmux | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 745c776f..30e9f2cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -29,6 +29,10 @@ byobu (4.47) unreleased; urgency=low usr/share/byobu/profiles/tmux, usr/share/doc/byobu/help.tmux.txt: - Add Shift-F12 to toggle keybindings on/off - Split tmux keybindings to separate file to source + * usr/bin/byobu-status-detail, usr/lib/byobu/.constants, + usr/share/byobu/keybindings/f-keys.tmux: + - set a BYOBU_PAGER environment variable + - use BYOBU_PAGER in places we need a pager -- Dustin Kirkland Tue, 08 Nov 2011 19:16:15 -0600 diff --git a/usr/bin/byobu-status-detail b/usr/bin/byobu-status-detail index 5343fc07..1ee61fbf 100755 --- a/usr/bin/byobu-status-detail +++ b/usr/bin/byobu-status-detail @@ -24,8 +24,7 @@ PKG="byobu" if which vim >/dev/null && `vim --version | grep -q +folding`; then byobu-status --detail | vim -c "set foldmethod=indent" -c "set foldminlines=0" -c "set foldnestmax=1" -c "set foldcolumn=2" -R - else - (which sensible-pager >/dev/null) && PAGER=sensible-pager || PAGER=less - byobu-status --detail | $PAGER + byobu-status --detail | $BYOBU_PAGER fi # vi: syntax=sh ts=4 noexpandtab diff --git a/usr/lib/byobu/.constants b/usr/lib/byobu/.constants index 651e66d4..0041cf87 100755 --- a/usr/lib/byobu/.constants +++ b/usr/lib/byobu/.constants @@ -96,3 +96,4 @@ esac # MacOS Support command -v gsed >/dev/null 2>&1 && export SED="gsed" || export SED="sed" command -v greadlink >/dev/null 2>&1 && export READLINK="greadlink" || export READLINK="readlink" +command -v sensible-pager >/dev/null 2>&1 && export BYOBU_PAGER="sensible-pager" || export BYOBU_PAGER="less" diff --git a/usr/share/byobu/keybindings/f-keys.tmux b/usr/share/byobu/keybindings/f-keys.tmux index 14a7de59..d05dbe82 100644 --- a/usr/share/byobu/keybindings/f-keys.tmux +++ b/usr/share/byobu/keybindings/f-keys.tmux @@ -24,7 +24,7 @@ set -g prefix ^A,F12 # Byobu's Keybindings # Documented in: /usr/share/doc/byobu/help.tmux.txt bind-key -n F1 new-window -k -n config byobu-config -bind-key -n S-F1 new-window -k -n help 'sensible-pager /usr/share/doc/byobu/help.tmux.txt' +bind-key -n S-F1 new-window -k -n help '$BYOBU_PAGER /usr/share/doc/byobu/help.tmux.txt' bind-key -n F2 new-window bind-key -n C-F2 display-panes \; split-window -h bind-key -n S-F2 display-panes \; split-window -v