From 0c2557a2d951ac3748b68f9c10dc47478ff77013 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Mon, 31 Aug 2015 09:17:40 -0500 Subject: [PATCH] byobu -h|--help enters manpage, place this code with -v|--version --- debian/changelog | 2 +- usr/bin/byobu.in | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5a39168a..20cca33e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,7 +6,7 @@ byobu (5.95) unreleased; urgency=medium * usr/bin/byobu.in: - ensure we start tmux with unicode support, LP: #1268072 * usr/bin/byobu.in, usr/share/man/man1/byobu.1: LP: #1483394 - - byobu -h|--help enters manpage + - byobu -h|--help enters manpage, place this code with -v|--version * usr/bin/byobu-shell.in: LP: #1458941 - find the motd * usr/share/byobu/keybindings/f-keys.tmux.disable: LP: #1453037 diff --git a/usr/bin/byobu.in b/usr/bin/byobu.in index da661297..cdac33df 100755 --- a/usr/bin/byobu.in +++ b/usr/bin/byobu.in @@ -21,15 +21,6 @@ VERSION=5.95 PKG="byobu" -# Enter manpage if -h|--help is anywhere on the command line -for i in $@; do - case "$i" in - -h|--help) - exec man $PKG - ;; - esac -done - # All sorts of things go wrong if you don't own your $HOME dir. # This happens under sudo, if you don't use the -H option; Byobu will # create a bunch of files in your $HOME which will be owned by root. @@ -76,7 +67,7 @@ export BYOBU_TTY=$(tty) # Get the default window name [ -n "$BYOBU_WINDOW_NAME" ] || BYOBU_WINDOW_NAME=- -# Add a version argument for debugging purposes +# Add a version argument for debugging purposes, enter manpage for help if [ "$#" = "1" ]; then case "$1" in -v|--version) @@ -91,6 +82,9 @@ if [ "$#" = "1" ]; then exec $BYOBU_BACKEND $BYOBU_ARG_VERSION exit 0 ;; + -h|--help) + exec man $PKG + ;; esac fi