Jesse Szwedko
8ce64f19ff
Merge pull request #187 from ravigadde/master
...
Added an API for number of flags set
2015-03-10 18:05:58 -07:00
Ravi Gadde
bcec9b08c7
Added an API and test case for number of flags set
2015-03-10 17:18:12 -07:00
Jesse Szwedko
012696c9b0
Merge pull request #196 from codegangsta/fix-deprecated-author-support
...
Fix support for deprecated author fields
2015-03-10 08:35:55 -07:00
jszwedko
b95607c608
Use named struct fields
2015-03-10 08:13:31 -07:00
jszwedko
7beac44ab1
Don't default authors
2015-03-10 08:03:05 -07:00
jszwedko
5f95a9e88b
Fix support for deprecated author fields
...
Should add an author if either name or email is specified.
2015-03-10 07:59:59 -07:00
jszwedko
bf65971a6a
Add Command.Aliases
and deprecate Command.ShortName
...
`Aliases` will be more flexible while still allowing "ShortName"
behaviour via `Aliases`.
2015-03-09 21:24:57 -07:00
Jesse Szwedko
3e0905345c
Merge pull request #186 from nrdufour/master
...
Fixing the issue with a command with subcommands not showing help message
2015-03-09 19:37:25 -07:00
Jesse Szwedko
842ff18343
Merge pull request #192 from codegangsta/add-multi-author-support
...
Add multi author support
2015-03-09 19:32:34 -07:00
jszwedko
01cdaa065a
Merge remote-tracking branch 'origin/master' into add-multi-author-support
...
Conflicts:
app.go
2015-03-09 19:20:56 -07:00
jhowarth
aba73cedac
Copy the writer of the App to the subcommand App
2015-03-03 14:02:42 -08:00
jhowarth
a6482d2687
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
app.go
command.go
flag.go
2015-03-02 15:21:01 -08:00
Jesse Howarth
b5844af298
Merge pull request #2 from ivey/requiredFlags
...
Required flags
2015-03-02 14:53:57 -08:00
jhowarth
145da3210f
don't require flags when the help flag is included
2015-03-02 12:06:42 -08:00
jhowarth
6023f370c1
dry error messages
2015-03-02 12:00:21 -08:00
jhowarth
e67e05f617
DRY error handling
2015-03-02 11:56:29 -08:00
jhowarth
cbd95292ac
Remove debugging
2015-03-02 11:18:59 -08:00
Nicolas Dufour
4be878bffc
Fixing the issue with a command with subcommands not showing help message.
...
- the command name is "" and HasName was returning true for an empty
ShortName.
- the Show method wasn't aware that command name was just "" and
returned the first subcommand.
2015-02-23 08:32:31 -05:00
Harrison
c6592bb487
app, help: add backwards compatibility for Authors
2015-02-21 10:44:00 +11:00
jszwedko
50c77ecec0
Fix comments for .After field on Command and App
2015-02-20 16:23:36 -05:00
Jesse Szwedko
532d0bc2e3
Merge pull request #151 from imdario/master
...
After: companion action for Before
2015-02-20 16:20:12 -05:00
Peter Smit
5308b4cd0f
Allow commands to be hidden from help and autocomplete
2015-02-06 10:46:32 +02:00
Jesse Szwedko
6086d7927e
Merge pull request #177 from vishalsodani/master
...
Fix sentence
2015-01-30 19:12:59 -08:00
Harrison
05ecd63a95
app_test: prepare for PR
2015-01-31 10:05:45 +11:00
Harrison
3d7183307a
app, help: add support for multiple authors
2015-01-31 10:04:52 +11:00
Vishal Sodani
2a9c617652
Fix sentence
2015-01-30 16:32:58 +05:30
Jesse Szwedko
e1712f3817
Merge pull request #170 from codegangsta/parse-flags-regardless
...
Use parsed context when running command as subcommnd
2015-01-27 21:16:17 -08:00
Dario Castañé
dca177c384
After handler brought up to speed.
...
As discussed in issue #151 , I modified the implementation to be simpler.
I checked how to propagate err, being done with a scope trick. From our
deferred function we cannot return a new value, so we override the "default"
return value (err), declared on functions' declarations.
Check this StackOverflow for more info: http://stackoverflow.com/a/19934989
2015-01-10 00:51:06 +01:00
Dario Castañé
4ab12cd639
jszwedko's suggestion done
2015-01-10 00:44:37 +01:00
Dario Castañé
4e3a83b43e
Merge branch 'master' of https://github.com/codegangsta/cli
...
Conflicts:
app.go
app_test.go
2015-01-10 00:35:11 +01:00
jszwedko
5159b98cbc
Use parsed context when running command as subcommnd
...
Rather than passing the unparsed context (parent context) in whenever
there are no subcommands.
2015-01-09 14:46:29 -05:00
Jesse Szwedko
bf4a526f48
Merge pull request #157 from dajulia3/pull_request
...
stop flag parsing after terminator --
2015-01-09 14:04:33 -05:00
97112754e1
Merge pull request #169 from codegangsta/use-0-as-int-base
...
Use 0 as the base when parsing ints
2015-01-09 13:13:49 -05:00
jszwedko
44d40054fa
Use 0 as the base when parsing ints
...
To be consistent with what the stdlib flag package does.
2015-01-09 13:10:42 -05:00
Jesse Szwedko
3005aa4907
Merge pull request #168 from szaydel/fixParseUint-Flag
...
strconv.ParseInt should be used instead of strconv.ParseUint when readin...
2015-01-09 13:10:19 -05:00
Sam Zaydel
ef23aa6da2
strconv.ParseInt should be used instead of strconv.ParseUint when reading Int Flags from envvars.
2015-01-09 05:53:14 -08:00
aee58516e6
Merge pull request #167 from codegangsta/use-double-quotes-in-defaults
...
Use double quotes in output for defaults
2015-01-08 16:28:32 -05:00
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
Matthew McNew
d05d895492
stop flag parsing after terminator --
...
Signed-off-by: David Wadden <dwadden@pivotal.io>
2014-12-17 09:56:05 -06: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
Jesse Howarth
8f1fb06a58
Merge pull request #1 from ivey/required_flags
...
Required flags
2014-12-02 15:23:01 -08:00
Jesse Howarth and Michael Ivey
4b2fcdb1ad
Add tests for required flags
2014-12-02 21:13:46 +00:00
Jesse Howarth and Michael Ivey
73e64a14fd
Add (required) to help of flags that are required.
2014-12-02 21:13:26 +00:00
Jesse Howarth and Michael Ivey
7e05320026
Implement required flags
2014-12-02 17:44:55 +00:00