Jesse Szwedko
922e3e2cea
Merge pull request #615 from uudashr/v2
...
Remove the error return signature
2017-04-17 22:23:20 -07:00
Jesse Szwedko
04b2f4ff79
Adjust spacing in cli-v1-to-v2 to satisfy flake8
2017-02-14 21:18:00 -08:00
Jesse Szwedko
230bac34b7
Allow slightly longer lines in Python scripts
2017-02-14 21:17:32 -08:00
Jesse Szwedko
e485446237
Merge pull request #555 from urfave/v2-merge
...
Merge origin/master into v2
2016-10-29 15:39:47 -07:00
Jesse Szwedko
03f77c6e74
Fix new example for v2 branch
2016-10-29 14:33:41 -07:00
Jesse Szwedko
83497d2cda
Merge remote-tracking branch 'origin/master' into v2-merge
2016-10-29 14:13:18 -07:00
Jesse Szwedko
76d8eaf9fe
Merge pull request #490 from nlewo/v2-completion
...
Generate completion code
2016-10-25 21:55:42 -07:00
Jesse Szwedko
f614c177b7
Merge pull request #543 from wking/app-description
...
app: Add App.Description
2016-10-25 21:54:02 -07:00
Jesse Szwedko
b803494208
Merge pull request #542 from mhmxs/patch-1
...
Display error instead of just say command is incorrect
2016-10-25 21:52:14 -07:00
Jesse Szwedko
6f2647a880
Merge pull request #544 from runcom/sort-flags
...
flags: sort flags
2016-10-22 10:29:59 -07:00
Jesse Szwedko
64fcd51526
Merge branch 'master' into sort-flags
2016-10-22 10:22:16 -07:00
Jesse Szwedko
3f4989051e
Merge pull request #550 from runcom/test-go-1-7
...
.travis.yml: add go 1.7.x
2016-10-22 09:40:07 -07:00
Jesse Szwedko
55f715e28c
Merge pull request #541 from dotCipher/patch-1
...
Typo in comments
2016-10-05 20:53:53 -07:00
Jesse Szwedko
d53eb99165
Merge pull request #531 from keloyang/SkipFlagParsing-SkipArgReorder-bugfix
...
bug fix when SkipFlagParsing is false and SkipArgReorder is true
2016-09-17 14:38:06 -07:00
Jesse Szwedko
61f519fe5e
Merge pull request #528 from urfave/backport-no-arg-reordering
...
Backport no argument reordering as an option
2016-09-11 20:00:11 -07:00
Frances Bar
3df4b71842
Backport no argument reordering as an option
...
In the unreleased version 2, the argument reordering has been removed
(in f585ec7cb8 ) since it only worked if
all of the arguments appeared before all of the flags, but not if they
were intermixed which was of limited utility and caused some confusion.
This commit allows enabling of this future behavior via SkipArgReorder.
Ideally we'd support complete intermingling of flags and arguments, but
this is unlikely to happen until we switch flag parsers.
Fixes #515
2016-09-11 12:04:35 -07:00
Jesse Szwedko
e7b1833f53
Dereference Flags if they are pointers
...
When checking if environment variables are set.
We don't support pointer flags currently (though this is the default in
the `v2` branch), but this fixes #516
2016-09-08 21:10:46 -07:00
Jesse Szwedko
4b62cb6b33
Update wording around gopkg.in pinning to be more accurate
...
Since we have `v1.X` tags, gopkg.in/urfave/cli.v1 will pull the latest
tagged release rather than the `v1` branch. Since there are no tagged
`v2` releases, `gopkg.in` will pull the latest commit of that branch.
Fixes #513
2016-09-03 14:23:36 -07:00
Jesse Szwedko
df95e0708f
Manually set import in altsrc flag generation
...
Otherwise `goimports` switches it to `github.com/urfave/cli`
2016-09-03 14:22:45 -07:00
Jesse Szwedko
2616eeb540
Merge pull request #512 from grubernaut/f-update-altsrc-import-v2
...
Update altsrc imports to gopkg.in
2016-08-28 13:23:17 -07:00
Jesse Szwedko
33bb4c1213
Merge pull request #511 from grubernaut/f-update-altsrc-import-v1
...
Fix import paths in altsrc
2016-08-28 13:23:14 -07:00
Jesse Szwedko
a5ca09a934
fixup! remove the possiblity of end-user's seeing deprecation warnings
2016-08-21 14:06:59 -07:00
Jesse Szwedko
8e6aa34a12
remove the possiblity of end-user's seeing deprecation warnings
...
Instead use deprecation pattern described in
https://blog.golang.org/godoc-documenting-go-code .
Fixes #507
2016-08-21 13:51:55 -07:00
Jesse Szwedko
168c95418e
Ensure that EnvVar struct field exists before interrogating it
...
Otherwise you end up with `<invalid Value>` which, in practice, would
probably work, but this is cleaner.
2016-07-31 20:11:16 -07:00
Jesse Szwedko
6c1f51aa95
Fix context.(Global)IsSet to respect environment variables
...
This appeared to be the least messy approach to hack in support for
IsSet also checking environment variables to see if a particular
cli.Flag was set without making backwards incompatible changes to the
interface.
I intend to fix this more properly in v2, probably by adding another
method to the cli.Flag interface to push the responsibility down as it
occurred to me that it was really the `Flag`s themselves that offer
support for configuration via the environment as opposed to the
`context` or other supporting structures. This opens the door for the
anything implementing the `Flag` interface to have additional sources of
input while still supporting `context.IsSet`.
2016-07-31 14:14:46 -07:00
Jesse Szwedko
b616f60886
Note TOML support in README and CHANGELOG
2016-07-31 12:11:52 -07:00
Jesse Szwedko
a71fcd8f23
Merge pull request #491 from ykanda/toml-support
...
Add TOML config file loader
2016-07-31 12:06:35 -07:00
Jesse Szwedko
d9021faab6
Merge pull request #500 from npcode/readme-remove-v
...
README: Remove unnecessary 'v' from version numbers
2016-07-25 18:14:03 -07:00
Jesse Szwedko
9646e60b1a
Merge pull request #484 from urfave/flake8-typegen
...
Run flake8 checks on generate-flag-types
2016-07-20 19:45:29 -07:00
Jesse Szwedko
40a9813f6f
Merge pull request #483 from urfave/merging-from-v1
...
Merging from v1
2016-07-14 19:22:57 -07:00
Jesse Szwedko
65da20beab
Correctly show help message if -h is provided to subcommand
...
Currently, if an action is specified on a subcommand, it ignores the
`-h` and `--help` flags if passed to the subcommand, e.g.:
`foo bar -h`
would call the default action on `bar` rather than show the help
documentation.
Fixes #477
2016-07-13 14:48:16 -07:00
Jesse Szwedko
73aa67b7a2
Merge pull request #466 from urfave/flag-context-gen
...
Generate code for flag types and context accessors
2016-07-13 14:07:04 -07:00
Jesse Szwedko
2b959bd891
Merge pull request #470 from johnweldon/PTAL-v2-implement-JSON-InputSource
...
Add JSON InputSource to altsrc package
2016-07-04 20:00:39 -07:00
Jesse Szwedko
3c9856d0fd
Add Float64SliceFlag to the CHANGELOG
2016-07-02 21:44:48 -07:00
Jesse Szwedko
c99ea0b14b
Merge pull request #468 from bfreis/v2
...
adding support for Float64SliceFlag
2016-07-02 21:29:10 -07:00
Jesse Szwedko
1efa31f08b
Release v1.18.0
2016-06-27 22:30:56 -07:00
Jesse Szwedko
2ec9cfb7f9
Add missing fixes to CHANGELOG.md
2016-06-27 22:28:27 -07:00
Jesse Szwedko
ee464a6db7
Merge pull request #465 from urfave/declarativeness
...
Remove `NewApp` initializer
2016-06-25 11:08:53 -05:00
Jesse Szwedko
4205e9c4ee
Merge pull request #463 from urfave/help-command-categorization
...
Help command categorization
2016-06-22 09:55:33 -05:00
Jesse Szwedko
06a850dff5
Merge pull request #456 from urfave/uint-flags
...
Add UintFlag, Uint64Flag types and supporting code
2016-06-16 11:58:30 -04:00
Jesse Szwedko
7817f72540
Merge pull request #450 from urfave/flag-value-changelog-mention
...
Mention #448 fix in change log
2016-06-08 19:50:24 -07:00
Jesse Szwedko
3f702904c5
Merge pull request #439 from urfave/migrators
...
Migrator touchup and testing
2016-06-06 21:19:42 -07:00
Jesse Szwedko
01a3382359
Merge pull request #444 from urfave/more-v1-examples
...
Add more v1 API examples
2016-06-01 20:01:28 -07:00
Jesse Szwedko
dddab48818
Merge pull request #438 from urfave/show-bool-default
...
Show BoolFlag default value in help usage
2016-05-28 12:03:46 -07:00
Jesse Szwedko
459201f506
Merge pull request #421 from urfave/minimize-struct-copying
...
Minimize copying while keeping things safe-ish
2016-05-27 20:00:23 -07:00
Jesse Szwedko
c11b8c9158
Merge pull request #431 from urfave/clean-stringlies
...
Ensure flag "Name" field values are un-stringly-fied
2016-05-24 23:22:09 -07:00
Jesse Szwedko
92372c1743
Merge pull request #433 from urfave/merging-from-v1
...
Merging from v1
2016-05-23 21:08:57 -07:00
Jesse Szwedko
2ae9042f5b
Merge pull request #422 from urfave/update-references-to-codegangsta
...
Update references to codegangsta to urfave (new org name)
2016-05-22 14:46:02 -07:00
Jesse Szwedko
024b4c6240
Update references to codegangsta to urfave (new org name)
...
Also add notice to README
2016-05-22 14:42:23 -07:00
Jesse Szwedko
b35c8a92d2
Merge pull request #419 from codegangsta/remove-stringlies
...
Replace all "stringly typed" fields with slice equivalents
2016-05-22 08:12:24 -07:00
Jesse Szwedko
65357985c2
Merge remote-tracking branch 'origin/master' into v2
2016-05-21 12:43:58 -07:00
Jesse Szwedko
f8fcce1c96
Merge pull request #414 from codegangsta/remove-boolt
...
Replace BoolTFlag type with BoolFlag.Value
2016-05-21 12:40:18 -07:00
Jesse Szwedko
bebbcf6d41
Merge pull request #417 from codegangsta/trim-go1.1-support
...
Trim go1.1 support
2016-05-21 11:46:57 -07:00
Jesse Szwedko
9eaa109385
Merge pull request #410 from codegangsta/remove-global-lookups
...
Remove all Context.Global* methods
2016-05-17 21:17:25 -07:00
Jesse Szwedko
12814f7c57
Merge pull request #413 from codegangsta/remove-deprecated
...
Remove deprecated things and supporting code
2016-05-17 17:01:40 -07:00
Jesse Szwedko
7f0ca9a349
Merge pull request #404 from codegangsta/runtests-argparse
...
Use argparse in runtests
2016-05-10 21:09:50 -07:00
Jesse Szwedko
92897b9bf6
Updating coverage badges
2016-05-10 20:42:38 -07:00
Jesse Szwedko
152e6ca11a
Merge pull request #407 from codegangsta/coverage-breakout
...
Separate badges for package coverage
2016-05-10 20:39:12 -07:00
Jesse Szwedko
f7b459e346
Merge pull request #406 from codegangsta/command-alias-help
...
Fix command alias printing in help text
2016-05-10 10:56:23 -07:00
Jesse Szwedko
9f09b40642
Merge pull request #400 from codegangsta/coverage
...
Add a vet/test runner script with coverage on by default
2016-05-09 22:16:32 -07:00
Jesse Szwedko
28eb7b2cc4
Added Hidden command support to CHANGELOG
2016-05-08 21:03:02 -07:00
Jesse Szwedko
cf4a731612
Merge pull request #386 from codegangsta/psmit-hidden_command
...
Merging #180 @psmit hidden command impl
2016-05-08 21:01:54 -07:00
Jesse Szwedko
592f1d97e5
Exit non-zero if a unknown subcommand is given
...
Currently it just prints the help message and exits 0.
We do this by modifying the helpCommand and helpSubcommand cli.Commands
to return an error if they are called with an unknown subcommand. This
propogates up to the app which exits with 3 and prints the error.
Thanks to @danslimmon for the initial approach!
Fixes #276
2016-05-07 17:26:15 -07:00
Jesse Szwedko
f585ec7cb8
Remove reordering of flags and arguments
...
This was introduced by #36 , but only worked in the specific case of all
arguments being passed before all flags. If the user mixed them, they
ended up with odd parsing behavior where the arguments were reordered
(causing #103 and #355 ).
Given the tradeoffs I think we should remove support for flag
reordering.
Fixes #103
Fixes #355
2016-05-07 16:36:54 -07:00
Jesse Szwedko
e3ace79a91
Add GlobalBoolT
...
Fixes #206
2016-05-07 16:11:26 -07:00
Jesse Szwedko
d3a4d5467b
Merge pull request #394 from mattfarina/travis-update
...
Update travis config for Go versions
2016-05-06 22:55:08 -07:00
Jesse Szwedko
d919ffad32
Merge pull request #395 from mattfarina/goreportcard
...
Adding Go Report Card badge
2016-05-06 22:54:45 -07:00
Jesse Szwedko
eb8680b7d7
Merge pull request #392 from codegangsta/string-slice-overwrite-on-set
...
Overwrite slice flag defaults when set
2016-05-05 08:42:14 -07:00
Jesse Szwedko
839f07bfe4
Merge pull request #381 from codegangsta/pluggable-flag-printer
...
Allow for pluggable flag-level help text formatting
2016-05-02 21:17:00 -07:00
Jesse Szwedko
4733699ce3
Update changelog with placeholder support
2016-04-25 19:47:42 -07:00
Jesse Szwedko
7528b17cc6
Merge pull request #357 from kevin-cantwell/parse-usage-placeholders
...
Parses usage placeholders via back quotes. Resolves #333
2016-04-25 19:45:59 -07:00
Jesse Szwedko
71f57d300d
Merge pull request #349 from Felamande/master
...
use filepath.Base instead of path.Base in Name & HelpName as default.
2016-04-03 18:54:34 -07:00
Jesse Szwedko
bc465beccc
Merge pull request #346 from codegangsta/category_sort_2
...
Add option to make categories with command, to display a more structured help
2016-03-26 15:39:47 -07:00
Jesse Szwedko
9fec0fad02
Merge pull request #343 from TimeIncOSS/f-hide-version
...
Never show version if HideVersion=true
2016-03-21 23:42:55 -05:00
Jesse Szwedko
a7936f1d21
Merge pull request #342 from korzonek/master
...
codebeat badge
2016-03-20 15:44:03 -05:00
Jesse Szwedko
a7be4a3f19
Describe category behavior in README
2016-03-20 12:18:28 -07:00
Jesse Szwedko
042842b819
Remove CategorizedHelp from App and allow subcommands to have categories
...
Just place all subcommands in categories, the default category will be
"" which will properly format the output (and group commands that have
no category).
Also allow subcommands to have categories.
Lastly, augment the test to check the output.
2016-03-20 12:17:13 -07:00
Jesse Szwedko
aca5b047ed
Drop support for Go 1.0.3
...
Incompatible with the new alternate input sources and I don't see
a compelling reason to continue its support.
2016-03-06 20:12:29 -08:00
Jesse Szwedko
6bb6787f33
Merge pull request #306 from ChrisPRobinson/inputfilesupport
...
Update to add yaml support
2016-03-06 20:12:11 -08:00
Jesse Szwedko
a2943485b1
Merge pull request #336 from muraty/master
...
Add NArg method to context
2016-02-27 08:56:50 -08:00
Jesse Szwedko
5db74198de
Merge pull request #334 from djui/patch-1
...
Fix semantic typo
2016-02-17 19:24:44 -08:00
Jesse Szwedko
0ab42fd482
Merge pull request #332 from adamclerk/fix/spellingErrors
...
Fixes spelling issues and import alphabetical issues
2016-02-09 20:42:30 -08:00
Jesse Szwedko
8cea2901d4
Merge pull request #331 from blaubaer/windows-ci
...
Added ci configuration for windows using AppVeyor
2016-02-08 21:40:34 -08:00
Jesse Szwedko
d5f087da9d
Merge pull request #289 from KSubedi/master
...
Added command to have a custom text on the USAGE section of help
2016-02-06 13:12:10 -08:00
Jesse Szwedko
94d8ca740d
Merge pull request #321 from blaubaer/master
...
Improve help messages for empty strings and do os specific envVar handling on windows
2016-02-06 13:06:44 -08:00
Jesse Szwedko
3565e5dfe6
Merge pull request #322 from blaubaer/custom-error-handling
...
Introduce custom usage error handling
2016-02-06 12:58:47 -08:00
Jesse Szwedko
0d23d77bee
Merge pull request #329 from leonardyp/master
...
optimization of some places
2016-02-06 11:30:49 -08:00
Jesse Szwedko
cf1f63a727
Merge pull request #323 from hpcloud/master
...
Fixed mishandling of a "-"(dash)-argument causing reordering of cli n…
2016-01-29 19:19:57 -08:00
Jesse Szwedko
114097b816
Merge pull request #326 from tcyrus/patch-1
...
Update README.md
2016-01-28 18:17:57 -08:00
Jesse Szwedko
f9cc3001e0
Merge pull request #315 from blaubaer/master
...
Improved Before/After handling for Commands
2016-01-21 21:44:38 -08:00
Jesse Szwedko
ca6f864fa3
Merge pull request #320 from technosophos/master
...
Remove panic from help.
2016-01-21 21:11:01 -08:00
Jesse Szwedko
c31a797586
Merge pull request #311 from Jille/exportFlagNames
...
Export cli.Flag.GetName (previously cli.Flag.getName)
2015-12-21 13:40:36 -05:00
Jesse Szwedko
8eb7738f18
Merge pull request #312 from ysh7/master
...
use path.Base in Name & HelpName as default values
2015-12-21 13:39:19 -05:00
Jesse Szwedko
b5232bb293
Merge pull request #309 from dedalusj/check-completion-order
...
Run check completion before error checking
2015-12-12 19:52:18 -05:00
Jesse Szwedko
a3c75bc94e
Merge pull request #304 from osocurioso/silence-tests
...
test: avoid output from "go test" when tests pass
2015-12-12 17:25:10 -05:00
Jesse Szwedko
0302d3914d
Merge pull request #283 from codegangsta/really-skip-flag-parsing
...
Really skip flag parsing
2015-11-20 13:56:42 -08:00
Jesse Szwedko
c75c9d0182
Merge pull request #298 from codegangsta/use-correct-example-naming
...
Use correct example naming and test on Go tip
2015-11-15 13:47:47 -08:00
Jesse Szwedko
0f218fffa5
Remave cli_test.go
...
Examples are redundant with the ones in app_test.go
2015-11-15 13:34:53 -08:00
Jesse Szwedko
631930114f
Also test on Go tip
...
But allow it to fail
2015-11-15 13:14:18 -08:00
Jesse Szwedko
4fc241fb17
Update examples to use correct naming convention
...
See https://golang.org/pkg/testing/#hdr-Examples
2015-11-15 13:14:11 -08:00