Commit Graph

17 Commits

Author SHA1 Message Date
Dan Buch
be875c395c
Add test to verify help command usage 2016-06-22 09:41:42 -04:00
Dan Buch
6f3bb94eae
Correct assertion text 2016-05-10 13:51:54 -04:00
Dan Buch
b9d96954ca
Fix command alias printing in help text
Closes #405
2016-05-10 13:41:43 -04:00
Matt Farina
2f4ec31264 Fixed spelling and gofmt issues 2016-05-09 09:40:09 -04:00
Dan Buch
5a5fa990e1
Merge remote-tracking branch 'origin/master' into exit-nonzero-for-unknown-subcommand 2016-05-09 00:59:36 -04:00
Jesse Szwedko
592f1d97e5 Exit non-zero if a unknown subcommand is given
Currently it just prints the help message and exits 0.

We do this by modifying the helpCommand and helpSubcommand cli.Commands
to return an error if they are called with an unknown subcommand. This
propogates up to the app which exits with 3 and prints the error.

Thanks to @danslimmon for the initial approach!

Fixes #276
2016-05-07 17:26:15 -07:00
Dan Buch
cc481d6b0e
Adjust command hiding to use similar convention as hidden flags
plus breaking out "setup" portion of `App.Run` into its own method, cleaning up
some bits of the help templates, and allowing for runtime opt-in of displaying
template errors to stderr.
2016-05-03 06:54:05 -04:00
Dan Buch
f397b1618c
Adding test for Command.Hidden handling in help text 2016-05-03 05:51:26 -04:00
Dan Buch
b7329f4968
Switch from multi-return with exit codes to ExitCoder check 2016-04-27 09:12:34 -04:00
Dan Buch
10c8309d84
Merge branch 'develop' of https://github.com/txgruppi/cli into txgruppi-develop 2016-04-25 18:10:10 -04:00
Radek Simko
d21170f0e3 Never show version if HideVersion=true 2016-03-21 16:12:46 +00:00
elij
db7af859d2 make help and version parsing use actual specified values
fixes #254
2015-10-13 15:20:36 -07:00
Edward Sheffler III
8ea1232ede Improve vendoring options by removing self-referential imports in tests. 2015-07-20 12:28:51 -07:00
Martin Falatic
dbde3303cf Test updated 2015-06-24 23:11:59 -07:00
Martin Falatic
595c055010 If Version is an empty string, suppress version output in usage help. 2015-06-24 23:07:32 -07:00
jszwedko
f952f5ac6f Rename TestShowAppHelp to be more verbose
Follow golang convention
2015-05-03 18:04:45 -07:00
jszwedko
96ad929784 Add test for inclusion of 'AUTHORS' in App help 2015-05-03 18:02:03 -07:00