Commit Graph

249 Commits

Author SHA1 Message Date
jszwedko
059c02782a Use double quotes in output for defaults
Windows doesn't recognize 's for wrapping values. "s should work on all
systems.
2015-01-08 15:35:23 -05:00
21d399c3fa Merge pull request #166 from codegangsta/fix-generic-flag-help-text
Fix help text for generic flag to not insinuate that you can specify mul...
2015-01-08 14:50:16 -05:00
5b9e204508 Merge pull request #153 from codegangsta/allow-hiding-of-help-flag
Allow hiding of help flag without hiding help subcommand
2015-01-08 14:49:36 -05:00
jszwedko
22dbe6ffdc Fix help text for generic flag to not insinuate that you can specify multiple
Feels like it may have been copied from StringSliceFlag or something,
but update the output to be more consistent with other single value
flags.

Also added comments to the String and Apply functions.
2015-01-08 14:27:09 -05:00
a14c5b47c7 Merge pull request #154 from codegangsta/allow-writer-to-be-set
Allow writer to be set
2014-12-12 08:50:46 -05:00
Jesse Szwedko
e7849f9239 Merge pull request #128 from nbjahan/patch-1
Fixed ShowSubcommandHelp
2014-12-11 20:37:53 -05:00
jszwedko
69b84ea804 Renaming fakeWriter to mockWriter for consistency 2014-12-10 10:33:59 -05:00
Jesse Szwedko
fbda1ce02d Merge pull request #141 from meatballhat/multi-env-var
Adding support for multiple env var "cascade"
2014-12-03 16:09:45 -05:00
jszwedko
e72094e6a4 Prefer fmt.Fprint* functions over io.WriteString
Less composition needed.
2014-12-01 23:57:35 -05:00
jszwedko
b8c8282de5 Merge remote-tracking branch 'origin/master' into allow-writer-to-be-set
Conflicts:
	app.go
	help.go
2014-12-01 23:51:35 -05:00
jszwedko
0d4870d63e Rename Stdout -> Writer 2014-12-01 23:50:04 -05:00
jszwedko
780f839a02 Allow hiding of help flag without hiding help subcommand
By utilizing struct zero value
2014-12-01 23:21:22 -05:00
Dan Buch
1dce44d781 Adding section in README about env var cascade
as well as moving a line back up where it belongs
2014-12-01 22:46:57 -05:00
Dan Buch
dca23da84b Merge remote-tracking branch 'origin/master' into multi-env-var 2014-12-01 22:44:36 -05:00
Jeremy Saenz
9908e96513 Update README.md 2014-11-23 13:46:56 -08:00
Jeremy Saenz
b731cdcd0b Merge pull request #152 from OVYA/master
Fix bash completion for deep level subcommands
2014-11-23 13:40:21 -08:00
Jeremy Saenz
0cd0f1a3ae Merge pull request #143 from artnez/master
Add Context.GlobalFlagNames()
2014-11-23 13:40:04 -08:00
Jeremy Saenz
bfc92c213e Merge pull request #146 from jhowarth/master
Add a function to determine if a global flag is set
2014-11-19 13:44:52 -08:00
pivaldi
59ef9567ae Fix bash completion for deep level subcommands 2014-11-19 11:05:01 +01:00
Jesse Szwedko
229729fae6 Merge pull request #150 from kytrinyx/readme-example
Clarify example in README. Fixes #149
2014-11-13 13:20:49 -05:00
Katrina Owen
993877b447 Clarify example in README. Fixes #149 2014-11-13 06:27:03 -08:00
Jesse Szwedko
61f43e7695 Merge pull request #147 from peterbourgon/master
Make -v, --version optional
2014-11-12 09:51:28 -05:00
Peter Bourgon
179c7a5f7c Make -v, --version optional 2014-11-12 12:38:58 +01:00
Jesse Howarth
a6bafbe9a5 Add additional test 2014-11-11 12:50:40 -08:00
Jesse Howarth
b490b5e35d Add a function to determine if a global flag is set. 2014-11-11 12:48:07 -08:00
Artem Nezvigin
6db418e461 Add Context.GlobalFlagNames() 2014-10-02 15:17:57 -07:00
f7ebb761e8 Merge pull request #137 from nyushi/fix-example-code
Fix example code
2014-09-22 23:34:35 -04:00
78d497e4cf Adding support for multiple env var "cascade" 2014-09-22 23:28:57 -04:00
Yushi Nakai
9610ab1729 Fix example code 2014-09-15 21:03:35 +00:00
Jesse Szwedko
7381bc4e62 Merge pull request #134 from Zearin/patch-1
Minor README tweaks
2014-08-27 20:51:55 -04:00
Tony
023450545e Minor README tweaks 2014-08-24 12:28:10 -04:00
Nima Jahanshahi
4db56687fa Fixed ShowSubcommandHelp
ShowSubcommandHelp should show help for the subcommand not the app
2014-08-11 11:27:26 +04:30
Jeremy Saenz
687db20fc3 Merge pull request #98 from jmervine/master
Exposing 'VersionPrinter'
2014-08-10 14:42:28 -07:00
Josh Mervine
089def51d8 Tweaking tests, removing local import. 2014-08-04 11:30:13 -07:00
Josh Mervine
120f0688a4 Merge remote-tracking branch 'parent/master'
Conflicts:
	cli_test.go
	flag_test.go
2014-08-04 11:25:45 -07:00
Jeremy Saenz
aa19913be3 Merge pull request #96 from ghigt/master
Add time.Duration flag type
2014-08-02 14:44:59 -07:00
Ghislain Gt
98af61a59f Add time.Duration flag type 2014-08-02 22:32:32 +01:00
Jeremy Saenz
c7ff3bf705 Merge pull request #95 from artnez/master
Add FlagNames() method to Context
2014-08-02 13:05:49 -07:00
Jeremy Saenz
5170d7f005 Merge pull request #99 from nyushi/add-zsh-autocomplete
Zsh completion
2014-08-02 13:02:06 -07:00
Jeremy Saenz
e30d7bdf28 Merge pull request #121 from KAllan357/add_cnf_to_subcommand
Copy CommandNotFound into the NewApp for subcommands
2014-08-02 12:57:48 -07:00
Jeremy Saenz
ec11175ac1 Merge pull request #123 from AudriusButkevicius/help
Additional help cleanup
2014-08-02 12:56:38 -07:00
Jeremy Saenz
0e069d0611 Update README.md 2014-08-02 12:46:57 -07:00
Jeremy Saenz
8b5fb40131 Added contributor guidelines 2014-08-02 12:45:44 -07:00
Jeremy Saenz
6543424570 Merge pull request #122 from AudriusButkevicius/author
Print author
2014-08-02 12:37:14 -07:00
Jeremy Saenz
565493f259 Merge pull request #108 from modcloth/env-config-fun
Adding support for default from the env
2014-08-02 12:32:48 -07:00
Audrius Butkevicius
527fbe0671 Unify template formatting 2014-07-26 22:24:08 +01:00
Audrius Butkevicius
fcc1613bb5 Do not show empty description section 2014-07-26 22:23:36 +01:00
Audrius Butkevicius
e38bac8225 Print author 2014-07-26 22:03:32 +01:00
Kyle Allan
156cd267e5 move to CommandNotFound copy to startApp 2014-07-25 10:06:04 -07:00
Kyle Allan
1880853f15 copy the CommandNotFound when running as a subcommand 2014-07-24 23:48:10 -07:00