From d94ccf560e5fd923e5c191488b7521c35208556e Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 2 Jun 2013 21:29:38 +0300 Subject: [PATCH] Simplify internals of init command a bit --- libexec/tmuxifier-init | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libexec/tmuxifier-init b/libexec/tmuxifier-init index 349d3d5..cc51abb 100755 --- a/libexec/tmuxifier-init +++ b/libexec/tmuxifier-init @@ -45,15 +45,8 @@ You might also need to add Tmuxifier's bin directory to your PATH." exit fi -print="" -for args in "$@"; do - if [ "$args" = "-" ]; then - print=1 - shift - fi -done - -if [ -z "$print" ]; then +# Print help if "-" argument is not given +if [[ " $@ " != *" - "* ]]; then echo "$(tmuxifier-help init $@)" >&2 exit 1 fi