From e10a4f27a7d49a6749a167834638ef85bede05f5 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 6 May 2009 20:57:25 -0500 Subject: [PATCH] * byobu-status-detail: use vim's folding status feature to allow for collapsing/expanding each status item; fall back on sensible-pager if +folding is not available; and fall back on less if sensible-pager is not available Signed-off-by: Dustin Kirkland --- byobu-status-detail | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/byobu-status-detail b/byobu-status-detail index 633dc7e6..ef13fef6 100755 --- a/byobu-status-detail +++ b/byobu-status-detail @@ -17,5 +17,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - -byobu-status --detail | less -R -p "#.*:$" +if vim --version | grep -qs +folding 2>&1; then + byobu-status --detail | vim -c "set foldmethod=indent" -c "set foldminlines=0" -R - +elif which sensible-pager >/dev/null 2>&1; then + byobu-status --detail | sensible-pager +else + byobu-status --detail | less +fi