Dan Buch
e3a099f7c5
Cleanups per flake8 and code review
2016-05-30 15:24:16 -04:00
Dan Buch
659e1c1e0b
Fill in migrations for cli.Exit and BoolFlag with Value
2016-05-30 15:16:19 -04:00
Dan Buch
2cfb957033
Run migration tests via ./runtests
2016-05-30 13:59:45 -04:00
Dan Buch
586b49ded8
Give up and use sudo on OS X again
2016-05-30 12:44:41 -04:00
Dan Buch
9158c1189d
Add dir with flake8 to path better-er
2016-05-30 12:40:13 -04:00
Dan Buch
b4db7c2b27
Do sudo-tastic system install os OS X
2016-05-30 12:34:33 -04:00
Dan Buch
27f4b751e4
Try a system pip install on OS X
2016-05-30 12:29:35 -04:00
Dan Buch
0ecae535a8
Where is flake8 on OS X?
2016-05-30 12:24:05 -04:00
Dan Buch
e5ba2f41c7
Ensure we're in the right dir before continuing
2016-05-30 11:09:37 -04:00
Dan Buch
5565a03705
Migrate and build extracted v1 examples
2016-05-30 11:02:49 -04:00
Dan Buch
3914ca9d5f
Update docs around migration script
...
and ensure ~/.local/bin is in PATH on OS X
2016-05-30 10:54:06 -04:00
Dan Buch
462217f9fc
Allow zero+ paths in migration script
...
and run the self-tests on Windows, too.
2016-05-30 10:46:00 -04:00
Dan Buch
6d59b40b68
Skip flake8 bits on Windows
...
since pip isn't already there, installing it is a bit of a pain, and the results
*should* be the same on all platforms
2016-05-30 10:27:44 -04:00
Dan Buch
e9027a59ef
Do a user-level install with pip
2016-05-30 10:23:21 -04:00
Dan Buch
b47e152395
Handle migration of both files and dirs
2016-05-30 10:21:13 -04:00
Dan Buch
eadd3918f1
Correct some flake8 bits
2016-05-30 09:53:47 -04:00
Dan Buch
80190b203c
Rename migration script and add more migrators
2016-05-30 09:51:12 -04:00
Dan Buch
d616529afc
Use make once instead of a loop with append
2016-05-27 14:38:51 -04:00
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
fac67ac91a
Show BoolFlag default value in help usage
...
now that BoolTFlag is gone
2016-05-21 20:02:08 -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