Jesse Szwedko
8cbee4b719
Merge pull request #244 from wallclockbuilder/patch-1
...
Fix tiny typo.
2015-06-11 17:23:08 -05:00
Mawueli Kofi Adzoe
c7be972e81
Fix tiny typo.
2015-06-11 10:24:06 +00:00
Jesse Szwedko
11ce503420
Merge pull request #241 from codegangsta/travis-update
...
Update Travis config to run against more versions on faster CI
2015-06-11 00:35:07 -05:00
474704ba13
Merge pull request #232 from codegangsta/fix-231
...
Version and help check should look for local flags too
2015-06-11 01:31:33 -04:00
Dan Buch
e04e926f10
Update Travis config to run against more versions on faster CI
2015-06-11 01:27:57 -04:00
Dan Buch
4407569431
Merge branch 'master' into fix-231
2015-06-11 01:23:20 -04:00
Peter Olds
2726643347
Add the ability to add a copyright
...
Signed-off-by: Peter Olds <polds@kyanicorp.com>
2015-06-09 16:35:50 -06:00
bryanl
a3b93076ff
Allow context value to be set after parse
...
This change allows a context value to be set after parsing. The use case is updating default settings in a Before func.
An example usage:
```
f, err := os.Open(configPath)
if err == nil {
config, err := docli.NewConfig(f)
if err != nil {
panic(err)
}
c.Set("token", config.APIKey)
}
```
2015-06-08 16:21:26 -04:00
Jesse Szwedko
616b730509
Merge pull request #233 from codegangsta/add-flag-docs
...
Add godoc comments to flag structs
2015-06-05 09:38:13 -07:00
Jesse Szwedko
005b120d20
Add godoc comments to flag structs
2015-06-02 20:51:09 -07:00
Jesse Szwedko
55b8924c2b
Merge pull request #230 from codegangsta/do-not-swallow-after-error
...
Aggregate errors from Before/After
2015-06-02 20:29:44 -07:00
Jesse Szwedko
2272dad83e
Version and help check should look for local flags too
...
Now that Global looks up the chain of contexts, the top level should
access the flags without the prefix (i.e. Bool rather than GlobalBool).
2015-06-02 20:16:44 -07:00
Jesse Szwedko
854c52192c
Merge pull request #227 from databus23/global-flags-from-all-parents
...
Collect global flags from the full command hierarchy
2015-06-01 21:25:30 -07:00
Jesse Szwedko
7ed7a51f86
Aggregate errors from Before/After
...
Previously `After` would overwrite any error from `Before`.
2015-06-01 21:14:53 -07:00
Jesse Szwedko
5d58d5b313
Merge pull request #229 from saromanov/fix-missing-value
...
Fix panic if Valus in Int/StringSliceFlasg is missing
2015-06-01 20:39:11 -07:00
Sergey Romanov
f47f7b7e85
Fix panic if Valus in Int/StringSliceFlasg is missing
2015-06-01 01:50:23 +05:00
Fabian Ruff
65d50017d4
search context hierachy for global flags
2015-05-18 23:21:33 +02:00
Victor Vieux
35ac968c9e
upate string slice usage
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-12 17:08:05 -07:00
jszwedko
942282e931
Add instructions for distributing bash completion
...
[ci skip]
2015-05-10 11:45:54 -07:00
jszwedko
a889873af5
Set additional information on command's 'app'
...
For completeness
2015-05-03 18:42:21 -07:00
Jesse Szwedko
4ee3fafcf8
Merge pull request #218 from codegangsta/add-another-help-test
...
Set writer when running command as app
2015-05-03 18:41:04 -07:00
jszwedko
b8104e5da7
Set writer when running command as app
...
Also add test from https://github.com/codegangsta/cli/pull/202 with
slight modifications.
2015-05-03 18:37:51 -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
Victor Vieux
7c041f5811
do not print 'AUTHOR(S):' is there is no author
...
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2015-05-03 18:01:26 -07:00
Jesse Szwedko
2e64a10881
Merge pull request #217 from codegangsta/readd-print-help-function
...
Readd printHelp function back
2015-05-03 17:52:12 -07:00
jszwedko
e842547421
Readd printHelp function back
...
But update signature to take a writer. This is a backwards incompatible
change for those overriding the HelpPrinter, but the hope is that this
feature is largely unused and the usage is easily updated.
2015-05-03 17:43:52 -07:00
Jesse Szwedko
30b361bf66
Merge pull request #211 from netbun/patch-1
...
changes to readme.md
2015-04-21 20:12:02 -07:00
My-khael Pierce
a66d4d2bec
changes to readme.md
2015-04-12 14:24:35 -04:00
My-khael Pierce
e8af095ac4
changes to readme.md
2015-04-09 04:42:53 -04:00
Jesse Szwedko
9b2bd2b348
Merge pull request #205 from codegangsta/fix-aliases-readme
...
Names -> Aliases in README.md
2015-03-23 19:59:03 -07:00
jszwedko
6c6d93d451
Names -> Aliases in README.md
2015-03-23 07:55:18 -07:00
2bcd11f863
Merge pull request #193 from codegangsta/add-aliases
...
Add `Command.Aliases` and deprecate `Command.ShortName`
2015-03-16 21:49:33 -04:00
jszwedko
daad50e530
Turns out I didn't mean to add ExampleAppCommands at all
2015-03-16 18:48:06 -07:00
jszwedko
474646abed
Didn't mean to remove ExampleAppSubcommand
...
Also specify struct field initializers
2015-03-16 18:04:57 -07:00
Jesse Szwedko
55e291873b
Merge pull request #200 from smallfish/patch-1
...
Update help.go
2015-03-16 17:52:42 -07:00
陈小玉
84630daaf4
Update help.go
...
change template `AUTHOR(s)` tab ident to whitespace.
2015-03-14 01:12:37 +08:00
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