From e66076be0d3824be8c5c11fe5eab548dcfdb4545 Mon Sep 17 00:00:00 2001 From: Maciek Sakrejda Date: Thu, 21 May 2015 21:17:41 -0700 Subject: [PATCH] Respond to help command by showing usage info --- bin/gvm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/gvm b/bin/gvm index 424c805..d8573e9 100755 --- a/bin/gvm +++ b/bin/gvm @@ -34,9 +34,7 @@ else if [ -f "$GVM_ROOT/scripts/$command" ]; then shift "$GVM_ROOT/scripts/$command" "$@" - elif [[ -n $command ]]; then - display_fatal "Unrecognized command line argument: '$command'" - else + elif [[ -z $command || $command = help ]]; then echo "Usage: gvm [command] Description: @@ -47,6 +45,7 @@ Commands: get - gets the latest code (for debugging) use - select a go version to use diff - view changes to Go root + help - display this usage text implode - completely remove gvm install - install go versions uninstall - uninstall go versions @@ -58,5 +57,7 @@ Commands: pkgset - manage go packages sets pkgenv - edit the environment for a package set " + else + display_fatal "Unrecognized command line argument: '$command'" fi fi