Jesse Szwedko
446f49e78f
Merge pull request #715 from urfave/maintainers-notice
...
Adjust contribution and maintainer prose per current reality
2018-02-20 21:16:31 -08:00
Jesse Szwedko
a1c7408de3
Merge pull request #712 from windler/fix_args_reorder
...
Fix args reordering when bool flags are present
2018-02-10 18:18:39 -08:00
Jesse Szwedko
803d066579
Merge pull request #704 from dolmen/replace-unneeded-Sprintf
...
Fix unnecessary uses of Sprintf
2018-02-02 13:13:18 -08:00
Jesse Szwedko
d3ae77c26a
Merge pull request #641 from cbranch/altsrc-parse-durations
...
altsrc: Parse durations from strings
2018-01-28 10:24:52 -08:00
Jesse Szwedko
1355f91780
Merge pull request #662 from OneOfOne/v2
...
lint + DefaultCommand
2018-01-28 10:14:10 -08:00
Jesse Szwedko
d604b6ffee
Merge branch 'v2' into altsrc-parse-durations
2018-01-28 10:12:24 -08:00
Jesse Szwedko
15a051e65a
Merge branch 'v2' into v2
2018-01-28 10:09:28 -08:00
Jesse Szwedko
20e2dde44b
Merge pull request #703 from urfave/update-osx-pip-name
...
Update pip to pip2 for new OSX builds
2018-01-28 10:09:08 -08:00
Jesse Szwedko
a35a28c15e
Update pip to pip2 for new OSX builds
...
See https://github.com/travis-ci/travis-ci/issues/8829
2018-01-28 09:58:38 -08:00
Jesse Szwedko
9b135236c7
Merge branch 'v2' into v2
2018-01-22 13:41:57 -08:00
Jesse Szwedko
75104e932a
Merge pull request #697 from urfave/fix-skip-flag-parsing
...
Fix regression of SkipFlagParsing behavior
2018-01-06 11:10:48 -08:00
Jesse Szwedko
e38e4ae2d0
Fix regression of SkipFlagParsing behavior
...
Introduced by df562bf1a8
Was mistakenly prepending the command name.
2017-12-29 13:38:18 -05:00
Jesse Szwedko
39908eb08f
Merge pull request #691 from urfave/refactor-686
...
Refactor flag handling logic
2017-12-12 08:34:29 -08:00
Jesse Szwedko
2610681040
Merge branch 'master' into refactor-686
2017-12-11 18:51:46 -08:00
Jesse Szwedko
0671b166dc
Add tests for flag reordering
2017-12-04 09:23:40 -08:00
Jesse Szwedko
119bb65648
Merge pull request #690 from gliptak/patch-1
...
Correct go vet for Go tip
2017-12-03 13:42:37 -08:00
Jesse Szwedko
df562bf1a8
Refactor flag handling logic
...
Refactor logic introduced by #686
2017-12-03 13:38:50 -08:00
Jesse Szwedko
c9eba3f37a
Merge pull request #686 from baude/shortoptionSkipArg
...
Handle ShortOptions and SkipArgReorder
2017-12-03 12:48:28 -08:00
Jesse Szwedko
c6af8847eb
Merge pull request #687 from joshuarubin/master
...
Don't clobber slices with EnvVar
2017-11-27 19:55:04 -08:00
Jesse Szwedko
7ace96b43d
Merge pull request #684 from baude/shortOptionHandling
...
Combine bool short names
2017-11-15 20:56:12 -08:00
Jesse Szwedko
9838c8bcaa
Update README examples to check for errors
...
To encourage good practices.
2017-11-11 17:46:07 -08:00
Jesse Szwedko
44cb242eeb
Merge pull request #675 from jmccann/continue3
...
Ability to load variable from file - UPDATED
2017-11-03 19:35:40 -07:00
Jesse Szwedko
7f4b273a05
Merge pull request #676 from rliebz/lexicographic-sort
...
Consider case when sorting strings
2017-10-30 19:55:34 -07:00
Jesse Szwedko
7bc6a0acff
Merge pull request #628 from phinnaeus/master
...
Allow custom ExitError handler function
2017-10-14 13:27:26 -07:00
Jesse Szwedko
2997500ba5
Merge pull request #672 from sierraechobravo/master
...
fix go report card issues
2017-10-07 13:56:23 -07:00
Jesse Szwedko
b2bf3c5abe
Merge pull request #670 from VMitov/path_flag
...
Add PathFlag
2017-09-28 15:42:40 -07:00
Jesse Szwedko
ac249472b7
Merge pull request #661 from rliebz/custom-flag-help
...
Allow customization of prefixes and environment variable hints in flag help strings
2017-09-25 20:41:18 -07:00
Jesse Szwedko
7fb9c86b14
Merge pull request #664 from maguro/master
...
Add newline before command categories
2017-09-10 21:08:19 -07:00
Jesse Szwedko
cfb3883072
Prepare CHANGELOG for v1.20.0 release
2017-08-10 18:42:03 -07:00
Jesse Szwedko
f5513590f5
Merge branch 'master' into backport-json-support
2017-08-10 18:06:12 -07:00
Jesse Szwedko
e1fa109a31
Define flag source precedence in README
...
Fixes #646
2017-08-10 17:54:24 -07:00
Jesse Szwedko
c717f7a215
Merge pull request #653 from urfave/master
...
Merging master into v1
2017-08-04 02:39:37 -07:00
Jesse Szwedko
b99aa811b4
Merge pull request #654 from urfave/appveyor-updates
...
Update os, image, golang, and python versions used in appveyor
2017-08-04 02:34:15 -07:00
Jesse Szwedko
4b90d79a68
Merge pull request #643 from nikkolasg/patch-1
...
[example] Make the basic example build-able.
2017-07-06 12:46:25 -07:00
Jesse Szwedko
b892ba3809
Merge pull request #583 from karalabe/invalidate-isset-cache
...
Invalidate context.setFlags cache on modification.
2017-06-24 20:28:08 -07:00
Jesse Szwedko
3ac1e107fe
Merge pull request #593 from urfave/command-subcommand-usage-text
...
Display UsageText on Commands and Subcommands
2017-06-24 20:27:41 -07:00
Jesse Szwedko
3ddfc81916
Merge pull request #626 from urfave/do-not-double-print-before-errors
...
Do not double print errors from Before()
2017-06-24 20:12:38 -07:00
Jesse Szwedko
4fb301aa38
Merge branch 'master' into invalidate-isset-cache
2017-06-24 20:04:24 -07:00
Jesse Szwedko
48db8e2435
Display UsageText on Commands and Subcommands
...
If it is set, otherwise build the usage.
Fixes #592
2017-06-24 20:02:36 -07:00
Jesse Szwedko
c64d74a5d9
Do not double print errors from Before()
...
They should be handled by HandleExitCoder() as `After()` errors are.
2017-06-24 19:57:19 -07:00
Jesse Szwedko
f229e3c59c
Merge pull request #629 from josephlr/use-usage-error-for-app
...
Subcommand OnUsageError should be passed to app
2017-06-24 19:32:30 -07:00
Jesse Szwedko
cf33a9befe
Merge pull request #586 from minio/extra-info
...
Add support for custom help templates.
2017-06-11 17:00:38 -07:00
Jesse Szwedko
74811faef3
Merge branch 'master' into extra-info
2017-06-11 16:24:10 -07:00
Jesse Szwedko
db0ff44081
Merge pull request #630 from josephlr/support-custom-flags
...
Add ability to use custom Flag types
2017-06-11 15:37:36 -07:00
Jesse Szwedko
d70f47eeca
Merge pull request #627 from urfave/use-command-context-in-usage-error
...
Rely on Command context in Run()
2017-05-05 21:25:29 -07:00
Jesse Szwedko
87fe13079e
Rely on Command context in Run()
...
Was previously relying on the parent context which caused things like
`.Command` to not be available to OnUsageError().
Fixes #609
2017-04-24 15:19:34 -07:00
Jesse Szwedko
61c3eb6ba1
Merge pull request #597 from urfave/fix-isset-for-env
...
Fix context.IsSet()
2017-04-24 14:45:55 -07:00
Jesse Szwedko
ab403a54a1
Merge pull request #616 from tbaud0n/master
...
Fix autocomplete issue when multiple apps run autocomplete from etc/bash_completion.d directory
2017-04-24 14:31:22 -07:00
Jesse Szwedko
d3793766a3
Merge branch 'master' into master
2017-04-24 14:13:35 -07:00
Jesse Szwedko
f6e8084112
Merge remote-tracking branch 'origin/master' into v1
2017-04-24 11:44:41 -07:00
Jesse Szwedko
924042785a
Merge pull request #624 from urfave/fetch-needed-commands
...
Explicitly fetch `goimports`
2017-04-24 11:43:35 -07:00
Jesse Szwedko
1bf0bb96b7
Only support supported Go versions
...
As described on https://github.com/golang/go/wiki/Go-Release-Cycle
The maintainers do not test compatibility for libraries (e.g. in
golang.org/x/tools) on older versions.
2017-04-24 11:02:41 -07:00
Jesse Szwedko
572dc46db5
Explicitly fetch goimports
...
Fetching the whole tree was failing on some Go versions and we really
only need goimports.
2017-04-24 10:40:54 -07:00
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
8ba6f23b6e
Merge pull request #582 from urfave/fix-altsrc-slice-inputs
...
Fix altsrc slice inputs so that they correctly parse
2017-03-28 18:35:17 -07:00
Jesse Szwedko
beddedeabd
Merge branch 'master' into fix-altsrc-slice-inputs
2017-03-27 20:46:54 -07:00
Jesse Szwedko
9e5b04886c
Remove logic that exited even if the error was not an OsExiter
...
This was introduced in #496 , but was discovered to be a regression in
the behavior of the library.
2017-03-04 14:33:36 -08:00
Jesse Szwedko
8d8f927bcb
Change flag test error checking to use regexp rather than strings
...
As the error messages changed in 1.8
2017-03-04 14:28:24 -08:00
Jesse Szwedko
9073334ecd
Fix context.IsSet()
...
Accidentally mangled the implementation when merging master into the
`v2` branch resulting in a dropped test.
2017-02-14 21:18:40 -08: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
2526b57c56
Allow slightly longer lines in Python scripts
2017-02-14 21:17:05 -08:00
Jesse Szwedko
347a9884a8
Merge pull request #589 from josephlr/subcommand-structure
...
Subcommand structure should be correctly passed to application
2017-01-28 13:39:59 -08:00
Jesse Szwedko
9913f0cef2
Merge branch 'master' into subcommand-structure
2017-01-28 13:35:02 -08:00
Jesse Szwedko
1d38670e45
Merge pull request #587 from guywithnose/master
...
Pass the ErrWriter on the root app to subcommands
2017-01-28 13:29:39 -08:00
Jesse Szwedko
e87dfbb6bb
altsrc: Support slices for TOML
2017-01-16 17:34:12 -08:00
Jesse Szwedko
f8347a97c6
Fix altsrc slice inputs so that they correctly parse
...
Was previously attempting to cast directly from []interface{} to
[]string or []int which Go doesn't support. Instead, we iterate over and
cast each value (error'ing if the value is not the correct format).
Fixes #580
2017-01-16 17:22:11 -08:00
Jesse Szwedko
56a7254df4
Merge pull request #540 from hirose31/fix/handle-multierror
...
Call HandleExitCoder for all members of MultiError.Errors
2017-01-16 14:20:16 -08:00
Jesse Szwedko
8ef3805c9d
Merge pull request #575 from MaximilianMeister/command-ordering
...
command: enable ordering commands by name
2017-01-09 20:57:14 -08:00
Jesse Szwedko
8f6a3675e1
Merge pull request #581 from appleboy/patch-2
...
[ci skip] fix template syntax error
2017-01-08 17:29:12 -05:00
Jesse Szwedko
4401a6ca20
Merge pull request #566 from fernandezvara/v1
...
allow to load YAML configuration files on Windows
2016-11-27 13:44:19 -08:00
Jesse Szwedko
6752c11c1c
Merge branch 'v1' into v1
2016-11-27 13:32:19 -08:00
Jesse Szwedko
0bdeddeeb0
Merge pull request #569 from urfave/prepare-1-19-1
...
Prep 1.19.1
2016-11-21 20:36:10 -08:00
Jesse Szwedko
0ef6582154
Prep 1.19.1
2016-11-21 20:26:35 -08:00
Jesse Szwedko
3ba36a3127
Merge pull request #568 from kklipsch/master
...
Fix for #556 broke the api for users who were using the ActionFunc
2016-11-21 20:21:12 -08:00
Jesse Szwedko
b6061c464d
Merge pull request #559 from joshuarubin/completion_fix
...
make shell autocomplete more robust
2016-11-19 11:05:28 -08:00
Jesse Szwedko
7fbcf2396a
Update date of 1.19.0 release in CHANGELOG
...
[ci skip]
2016-11-19 11:04:57 -08:00
Jesse Szwedko
a8fc36b690
Update CHANGELOG
2016-11-19 10:55:36 -08:00
Jesse Szwedko
6a87e37dff
Merge pull request #564 from urfave/altsrc-errorable-flag
...
Make ApplyWithError a public method on errorableFlag
2016-11-19 10:51:37 -08:00
Jesse Szwedko
d71794de19
Make ApplyWithError a public method on errorableFlag
...
Add to altsrc flags. Otherwise, flagSet() was bypassing altsrc's attempt
at shadowing.
2016-11-19 10:51:20 -08:00
Jesse Szwedko
8500a4cefd
Merge pull request #567 from drekar/errorable-flag-panic-fix
...
errorableFlag: scope result of type assertion.
2016-11-19 10:11:24 -08:00
Jesse Szwedko
b4f4786f37
Merge pull request #529 from urfave/prepare-v1.19.0
...
Prepare v1.19.0 release
2016-11-13 15:35:18 -08:00
Jesse Szwedko
dcdea39be2
Add additional entries to changelog for v.19.0 release
2016-11-13 15:04:31 -08:00
Jesse Szwedko
fa7ccb1447
Update changelog
2016-11-13 15:01:04 -08:00
Jesse Szwedko
4c2360f975
Prepare CHANGELOG for v1.19.0
2016-11-13 15:01:04 -08:00
Jesse Szwedko
de551c4450
Backport removal of deprecation warnings
...
#508
2016-11-13 15:01:04 -08:00
Jesse Szwedko
31b79c9a33
Merge pull request #530 from urfave/consider-empty-env-vars
...
Consider empty environment variables as set
2016-11-13 15:00:04 -08:00
Jesse Szwedko
b4a64dc08d
Add windows implementation of Clearenv for tests
...
Apparently `Clearenv` in Windows just sets the variables to ""
2016-11-13 14:59:35 -08:00
Jesse Szwedko
e367fafa3d
Return an error when parsing environment variables for values fails
...
Currently cli silently (aside from IntSlice and Int64Slice which oddly
printed directly to the error stream) ignores failures that occur when
parsing environment variables for their value for flags that define
environment variables. Instead, we should propogate up the error to the
user.
This is accomplished in a backwards compatible manner by adding a new,
internal, interface which defines an applyWithError function that all
flags here define. In v2, when we can modify the interface, we can drop
this secondary interface and modify `Apply` to return an error.
2016-11-13 14:59:35 -08:00
Jesse Szwedko
a00c3f5872
Consider empty environment variables as set
...
When assigning values to flags (also when interogatting via
`context.(Global)IsSet`.
For boolean flags, consider empty as `false`.
Using `syscall.Getenv` rather than `os.LookupEnv` in order to support
older Golang versions.
2016-11-13 14:59:27 -08:00
Jesse Szwedko
7a5dacbc41
Merge pull request #560 from mh-cbon/master
...
Close #558 : detect FormattedError and print their stack trace
2016-11-13 13:44:15 -08:00
Jesse Szwedko
af372e8e2a
Merge branch 'master' into master
2016-11-12 14:32:21 -08:00
Jesse Szwedko
88ae7af8d4
Merge pull request #563 from urfave/print-help-if-no-action
...
If no action is specified on the command or app, print the help documentation
2016-11-12 13:49:46 -08:00
Jesse Szwedko
0113f56d10
If no action is specified on the command or app, print the help documentation
...
Rather than panic'ing or displaying an opaque error message about the
signature which is more confusing to the end user.
Fixes #562
2016-11-12 13:37:07 -08:00
Jesse Szwedko
36053a9dfd
Merge branch 'master' into fix/handle-multierror
2016-11-12 12:46:57 -08:00
Jesse Szwedko
b377b5d9e9
Use type assertions rather than reflection to determine how to call the Action
...
This has some benefits, but results in possibly less informative error
messaging; however, given that there are only two accepted types,
I think the error messaging is sufficient.
2016-11-01 20:33:12 -07:00
Jesse Szwedko
3eb41f1bb1
Merge pull request #547 from urfave/default-writer
...
Default app.Writer to os.Stdout
2016-10-29 18:45:05 -07:00
Jesse Szwedko
61db37e7ae
Merge branch 'master' into default-writer
2016-10-29 18:36:19 -07: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