Commit Graph

1008 Commits

Author SHA1 Message Date
Dan Buch 5fa09b8e23 Strip trailing slash for cleanliness 2016-05-09 09:00:22 -04:00
Dan Buch d94fdb3e84 Break runtests back into steps for more granular CI feedback 2016-05-09 08:58:20 -04:00
Dan Buch 2df2fa514d Skip coverage bits on < go1.2 2016-05-09 08:49:38 -04:00
Dan Buch b9f33fbe6d Add a vet/test runner script with coverage on by default 2016-05-09 08:41:01 -04:00
meatballhat 63ed8b0bde Merge pull request #399 from codegangsta/exit-nonzero-for-unknown-subcommand
Exit non-zero if a unknown subcommand is given
2016-05-09 01:05:34 -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
meatballhat 8ef3b8f7bb Merge pull request #397 from codegangsta/add-global-boolt
Add context.GlobalBoolT
2016-05-09 00:51:31 -04:00
Dan Buch 5704421e7b Merge remote-tracking branch 'origin/master' into add-global-boolt 2016-05-09 00:44:27 -04:00
Jesse Szwedko 28eb7b2cc4 Added Hidden command support to CHANGELOG 2016-05-08 21:03:02 -07:00
Jesse Szwedko cf4a731612 Merge pull request #386 from codegangsta/psmit-hidden_command
Merging #180 @psmit hidden command impl
2016-05-08 21:01:54 -07:00
Dan Buch dfa9a87bee Add tests for App.VisibleCategories & App.VisibleCommands 2016-05-08 23:54:12 -04:00
Dan Buch 97d2df6dd7 Merge remote-tracking branch 'origin/master' into psmit-hidden_command 2016-05-08 18:44:38 -04:00
meatballhat ade5513337 Merge pull request #393 from mattfarina/io-Writer
Provide a variable for writing output (the writer) with a default of os.Stderr
2016-05-08 18:39:04 -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
Jesse Szwedko e3ace79a91 Add GlobalBoolT
Fixes #206
2016-05-07 16:11:26 -07:00
Jesse Szwedko d3a4d5467b Merge pull request #394 from mattfarina/travis-update
Update travis config for Go versions
2016-05-06 22:55:08 -07:00
Jesse Szwedko d919ffad32 Merge pull request #395 from mattfarina/goreportcard
Adding Go Report Card badge
2016-05-06 22:54:45 -07:00
Matt Farina 0a3c5e7516 Letting Travis CI select the patch version of Go 1.4 to use
The last release of Go 1.4 when installed on Travis CI does not
have go vet installed. Letting Travis CI select the patch version
instead.
2016-05-06 12:30:30 -04:00
Matt Farina e9970b7b13 Adding Go Report Card badge 2016-05-06 12:24:51 -04:00
Matt Farina cd230f3a88 Update travis config for Go versions
- Added Go 1.6 testing
- Updated 1.5.x and 1.4.x to latest point releases
2016-05-06 12:19:01 -04:00
Matt Farina 6f0b442222 Update to ErrWriter and make available on app 2016-05-06 12:14:26 -04:00
Matt Farina 2a256d4c53 Provide a variable for writing output with a default of os.Stderr 2016-05-05 10:26:53 -04:00
meatballhat 75b97d09d9 Merge pull request #390 from codegangsta/readme-example-touchup
Assert output in some README examples
2016-05-04 20:04:10 -04:00
Dan Buch 11ad2b36c8 Assert output in some README examples 2016-05-04 19:41:33 -04: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 5c641d69b4 Merge branch 'hidden_command' of https://github.com/psmit/cli into psmit-hidden_command 2016-05-03 05:50:36 -04:00
Jesse Szwedko 839f07bfe4 Merge pull request #381 from codegangsta/pluggable-flag-printer
Allow for pluggable flag-level help text formatting
2016-05-02 21:17:00 -07:00
meatballhat b14dcdb7b9 TRIVIAL the letter "a" 2016-05-02 21:20:23 -04:00
Dan Buch cd92adcb75 Further simplifying default flag stringer func 2016-05-02 19:58:16 -04:00
Dan Buch 6089d723a8 Use existing prefixedNames func 2016-05-02 19:52:39 -04:00
Dan Buch 7de151883c Added more notes about usage formatting changes 2016-05-02 19:48:35 -04:00
Dan Buch e56207bd51 Merge branch 'vieux-change_varargs_usage' into pluggable-flag-printer 2016-05-02 19:45:56 -04:00
Dan Buch 2e4d25db14 Merge branch 'change_varargs_usage' of https://github.com/vieux/cli into vieux-change_varargs_usage 2016-05-02 19:45:21 -04:00
Dan Buch 69a8e25f3d Make flag usage rendering more consistent; show default values 2016-05-02 19:42:08 -04:00
Dan Buch 23af5dd643 Rename flag stringer func bits for clarity, consistency 2016-05-02 13:07:57 -04:00
Dan Buch 22773b14c1 Allow for pluggable flag-level help text formatting
by defining `cli.DefaultFlagStringFunc` with a default value that uses
`withEnvHint`, conditionally running a given flag's `FormatValueHelp` if
present.

Closes #257
2016-05-02 13:05:21 -04:00
meatballhat 415b5e766a Merge pull request #380 from codegangsta/readme-cli-refs
Change refs from `cli.go` to cli
2016-05-02 12:06:58 -04:00
Dan Buch 5c36fa18d9 Change refs from cli.go to cli
since the days of this being a single-file library are long gone.
2016-05-02 11:51:54 -04:00
meatballhat d69b4400b5 Merge pull request #379 from codegangsta/v1.16.0-prep
Version 1.16.0 prep
2016-05-02 11:49:06 -04:00
Dan Buch edc8458637 Merge branch 'PaulMakepeace-fix-err-assertion' into v1.16.0-prep 2016-05-02 11:42:18 -04:00
Dan Buch ecf21a7a09 Merge branch 'fix-err-assertion' of https://github.com/PaulMakepeace/cli into PaulMakepeace-fix-err-assertion 2016-05-02 11:41:51 -04:00
Dan Buch fe67cb0f3d Add note about error handling fix, prep 1.16.0 section 2016-05-02 11:41:01 -04:00
meatballhat 4cb9a7a5bb Merge pull request #378 from codegangsta/exit-error-bug-376
Ensure HandleAction/HandleExitCoder work correctly with *ExitError
2016-05-02 11:36:18 -04:00
Dan Buch 4b4c07bd4f Ensure HandleAction/HandleExitCoder work correctly with *ExitError
Closes #376
2016-05-02 11:32:22 -04:00
Gert-Jan Timmer a90e2e4ff1 Fix #376 NewExitError not working, reflect vals[0] cast to Interface() was missing 2016-05-02 17:06:14 +02:00
Paul Makepeace f90241a6a3 Assert type against actual return val's interface.
Exit code example produces now correctly,
	https://github.com/codegangsta/cli#exit-code

	```
	$ ./ec --ginger-crouton=false
	it is not in the soup
	$ echo $?
	86
	$
	```
2016-05-01 20:58:59 -07:00
meatballhat ff84ca213d Merge pull request #374 from codegangsta/kytrinyx-action-err
Merging #135 😻
2016-05-01 10:34:16 -04:00
Dan Buch 1cda555a05 Merge branch 'action-err' of https://github.com/kytrinyx/cli into kytrinyx-action-err 2016-05-01 10:26:54 -04:00
meatballhat fd7bf3b85f Merge pull request #373 from codegangsta/doc-custom-help
Add some explicit docs about help text customization
2016-05-01 10:10:46 -04:00