Dan Buch
ed8f4ac408
Fix example that uses ExitCoder
2016-05-25 12:07:49 -04:00
Dan Buch
3d75e9e711
Go with interfaces + private opaque types
...
rather than public types that wrap slices
2016-05-25 12:05:14 -04:00
Dan Buch
cd1e8c3452
Merge remote-tracking branch 'origin/v2' into minimize-struct-copying
2016-05-25 09:35:21 -04:00
Dan Buch
8c89b2c442
Merge remote-tracking branch 'origin/master' into v2
2016-05-25 09:18:48 -04:00
Dan Buch
f2d92acb5d
Point at correct gfmxr location
2016-05-24 16:07:30 -04:00
Dan Buch
2b288769c7
Add comment about commaWhitespace stripping of flag.Name
2016-05-24 04:00:37 -04:00
Dan Buch
5700dc5a80
Merge remote-tracking branch 'origin/master' into v2
2016-05-23 22:09:32 -04:00
Dan Buch
a41a43b00f
Switch to fmt.Fprintf for displaying usage error
2016-05-23 22:03:19 -04:00
Dan Buch
8f25dbb615
Ensure all flag aliases are set when Destination given
...
and extend "Incorrect Usage" message to show the error.
Closes #430
2016-05-23 22:00:59 -04:00
Dan Buch
ec05a8d31b
Ensure flag "Name" field values are un-stringly-fied
...
to (hopefully) help with bug triage & pinpointing usage issues since ripping out
stringly typed "Name".
2016-05-23 20:55:03 -04:00
Dan Buch
e4666418bb
Add (and backfill) some notes about platform support
2016-05-23 20:34:33 -04:00
Dan Buch
f136df348e
Only test latest go on osx
2016-05-23 20:21:14 -04:00
Dan Buch
dcc28a1b2b
Enable osx testing
2016-05-23 20:19:54 -04:00
Dan Buch
61710ff108
Make slice wrapping pattern more consistent
...
and move *Args out into its own file
2016-05-23 20:15:35 -04:00
Dan Buch
2f3309c789
Merge remote-tracking branch 'origin/master' into v2
2016-05-23 19:49:39 -04:00
Dan Buch
377aca16cf
Trivial updates to appveyor config
2016-05-23 19:39:04 -04:00
Dan Buch
9b16216c07
Merge remote-tracking branch 'origin/v2' into minimize-struct-copying
2016-05-23 19:37:17 -04:00
Dan Buch
b37df9de86
See why README examples are unhappy on Windows
2016-05-22 20:35:25 -04:00
Dan Buch
4566119b39
Close temporary file before running go tool cover
2016-05-22 19:44:21 -04:00
Dan Buch
9491a91336
Try to run a python script
2016-05-22 19:37:59 -04:00
Dan Buch
d277cbf893
Use clone_folder in appveyor.yml
...
instead of dir moving shenanigans
2016-05-22 19:32:48 -04:00
Dan Buch
531c7defe7
Trying xcopy instead of move
2016-05-22 19:18:38 -04:00
Dan Buch
288d62118a
Try to get appveyor.yml working again
2016-05-22 19:15:05 -04:00
Dan Buch
6d6f7da978
Merging from master/v1
2016-05-22 18:30:07 -04:00
Dan Buch
cd10b49473
Minimize struct copying
...
by using pointer func receivers and slices of struct pointers where possible.
2016-05-22 15:20:52 -04:00
Dan Buch
334e66cb8f
Remove unused (so far) func
2016-05-22 10:59:42 -04:00
Dan Buch
81fcf706ea
Replace all "stringly typed" fields with slice equivalents
...
and alter the Flag interface accordingly
Closes #415
2016-05-21 21:29:45 -04:00
Dan Buch
71b858d796
Skipping gfmxr on go1.1, too
2016-05-21 08:53:15 -04:00
Dan Buch
9132ebec9e
Customize install step for go1.1.2
2016-05-21 08:53:09 -04:00
Dan Buch
00bd2a95b2
Do not test ./altsrc on go1.1
...
as the YAML library requires go1.2+
2016-05-21 08:53:01 -04:00
Dan Buch
9c132d990a
Add more tests for BoolFlag{Value: true}
2016-05-18 08:30:28 -04:00
Dan Buch
f2d5ed9933
Replace BoolTFlag type with BoolFlag.Value
...
Closes #412
2016-05-18 08:20:15 -04:00
Dan Buch
a02aab6b4b
Add note about removal of Context.Parent
2016-05-17 20:27:42 -04:00
Dan Buch
1925bb4e3b
Merge remote-tracking branch 'origin/v2' into remove-global-lookups
2016-05-17 20:26:30 -04:00
Dan Buch
c19dbaf230
Remove deprecated things and supporting code
2016-05-17 15:11:44 -04:00
Dan Buch
7318e27528
Tidy up the flag name visitor func in Context
2016-05-17 03:46:16 -04:00
Dan Buch
7828300b97
Merge remote-tracking branch 'origin/v2' into remove-global-lookups
2016-05-17 03:35:08 -04:00
Dan Buch
6b0c4de4aa
Merge remote-tracking branch 'origin/master' into v2
2016-05-17 03:34:53 -04:00
Dan Buch
37e2f51a16
Merge remote-tracking branch 'origin/v2' into remove-global-lookups
2016-05-17 03:17:03 -04:00
Dan Buch
c720f37e15
Context tests and tweaks around lineage traversal
...
per feedback on #410
2016-05-17 03:16:26 -04:00
Dan Buch
cfc21d1af6
Merge remote-tracking branch 'origin/master' into v2
2016-05-16 11:04:15 -04:00
Dan Buch
61e5e9362f
Clarify state of v1 branch
2016-05-16 10:48:21 -04:00
Dan Buch
8af550936f
Add another bit about pinning to v1
2016-05-16 10:46:43 -04:00
Dan Buch
1beb5f66cd
Add some docs about the v2 branch
2016-05-16 10:43:05 -04:00
Dan Buch
bef835d455
Remove all Context.Global* methods
...
and change the behavior of the non-Global variants to always search up the
context lineage.
Closes #385
2016-05-16 10:18:15 -04:00
Dan Buch
cab5c58774
Merge remote-tracking branch 'origin/master' into v2
2016-05-15 20:43:31 -04:00
Dan Buch
50b384d904
Separate badges for package coverage
2016-05-10 14:51:27 -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
Dan Buch
1398157654
Use argparse in runtests
...
like Zeus intended
2016-05-10 08:16:33 -04:00
Dan Buch
33f5de5f18
Move the ./runtests changelog entry to up Unreleased
2016-05-10 08:09:27 -04:00
Dan Buch
2b4b13096f
Merge remote-tracking branch 'origin/master' into coverage
2016-05-09 18:53:45 -04:00
Dan Buch
32ebecfbb5
Merge remote-tracking branch 'origin/master' into v2
2016-05-09 11:18:21 -04:00
Dan Buch
2fcbd9d729
Preparing for v1.17.0 release
2016-05-09 10:52:31 -04:00
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
Dan Buch
bac790c819
Merge remote-tracking branch 'origin/master' into v2
2016-05-09 08:00:13 -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
Dan Buch
5704421e7b
Merge remote-tracking branch 'origin/master' into add-global-boolt
2016-05-09 00:44:27 -04: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
Dan Buch
a4590caea5
Merge remote-tracking branch 'origin/v2' into string-slice-overwrite-on-set
2016-05-05 10:16:58 -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
Dan Buch
a1e5328e30
Merge remote-tracking branch 'origin/master' into string-slice-flag-default-160
2016-05-03 05:25:07 -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
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
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
Dan Buch
4b4c07bd4f
Ensure HandleAction/HandleExitCoder work correctly with *ExitError
...
Closes #376
2016-05-02 11:32:22 -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
Dan Buch
b738841df8
Add some explicit docs about help text customization
2016-05-01 10:06:12 -04:00
Dan Buch
007295e509
Cleaning up the recently-introduced deprecations
...
to ensure the intent, responsibility, and migration path are all more clear.
2016-05-01 09:09:54 -04:00
Dan Buch
9584555150
Include details of hidden flag impl in CHANGELOG
2016-05-01 08:44:01 -04:00
Dan Buch
fed78b8bab
Rework of hidden flag impl plus some Action func corrections
2016-05-01 08:36:17 -04:00
Dan Buch
a9afed5b15
Prepping v1.15.0 release
2016-04-30 13:48:08 -04:00
Dan Buch
896d2fd3c1
Add a note to CHANGELOG about dot-delimited YAML key lookup
2016-04-30 13:27:11 -04:00
Dan Buch
1fb52b3bce
Merge remote-tracking branch 'origin/master' into string-slice-flag-default-160
2016-04-30 13:13:02 -04:00
Dan Buch
f3b589e892
Remove unreachable code
2016-04-30 12:22:32 -04:00
Dan Buch
e059dc8188
Implement *Context.GlobalSet + relevant CHANGELOG entry
2016-04-30 11:46:47 -04:00
Dan Buch
4edb5c9a6b
Merge branch 'bryanl-set-context-values' of https://github.com/bryanl/cli into bryanl-bryanl-set-context-values
2016-04-30 11:25:05 -04:00
Dan Buch
e2161d7f64
Minor changelog update bits
2016-04-30 09:54:44 -04:00
Dan Buch
06c01a4bba
A few tweaks based on feedback in #361
2016-04-29 03:01:57 -04:00
Dan Buch
1a91f3dce5
Ensure IntSlice & StringSlice serialization works as expected
2016-04-29 02:53:58 -04:00
Dan Buch
d1b0c49a98
Ensure slice types can safely round-trip through flag.FlagSet
2016-04-29 02:30:49 -04:00
Dan Buch
4cae17cfe1
Ensure MultiError returned when both Before and After funcs given
2016-04-28 17:15:16 -04:00
Dan Buch
ee736e063a
Merge remote-tracking branch 'origin/master' into string-slice-flag-default-160
2016-04-28 16:53:45 -04:00
Dan Buch
61d4175525
Merge remote-tracking branch 'origin/master' into txgruppi-develop
2016-04-28 16:20:02 -04:00