byobu -h|--help enters manpage, place this code with -v|--version

This commit is contained in:
Dustin Kirkland 2015-08-31 09:17:40 -05:00
commit 0c2557a2d9
2 changed files with 5 additions and 11 deletions

2
debian/changelog vendored
View file

@ -6,7 +6,7 @@ byobu (5.95) unreleased; urgency=medium
* usr/bin/byobu.in: * usr/bin/byobu.in:
- ensure we start tmux with unicode support, LP: #1268072 - ensure we start tmux with unicode support, LP: #1268072
* usr/bin/byobu.in, usr/share/man/man1/byobu.1: LP: #1483394 * 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 * usr/bin/byobu-shell.in: LP: #1458941
- find the motd - find the motd
* usr/share/byobu/keybindings/f-keys.tmux.disable: LP: #1453037 * usr/share/byobu/keybindings/f-keys.tmux.disable: LP: #1453037

View file

@ -21,15 +21,6 @@
VERSION=5.95 VERSION=5.95
PKG="byobu" 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. # 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 # 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. # 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 # Get the default window name
[ -n "$BYOBU_WINDOW_NAME" ] || BYOBU_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 if [ "$#" = "1" ]; then
case "$1" in case "$1" in
-v|--version) -v|--version)
@ -91,6 +82,9 @@ if [ "$#" = "1" ]; then
exec $BYOBU_BACKEND $BYOBU_ARG_VERSION exec $BYOBU_BACKEND $BYOBU_ARG_VERSION
exit 0 exit 0
;; ;;
-h|--help)
exec man $PKG
;;
esac esac
fi fi