Commit Graph

907 Commits

Author SHA1 Message Date
Michael Schuett
50b52ca9d5 Fix unit tests 2019-01-27 17:25:59 -05:00
Michael Schuett
9720ac029c Basic working flag category support 2019-01-27 15:48:00 -05:00
Michael Schuett
51aebb5a03 Add mod files
Let us use this repo via replace locally.
2019-01-27 12:00:16 -05:00
Michael Schuett
9dd96e9e90 Add in Category to Flag interface 2019-01-27 11:41:54 -05:00
Michael Schuett
7c383b0d16 Go Fmt 2019-01-27 01:44:36 -05:00
Michael Schuett
ff1c0b58dd Start of category flag support
This adds what I think needs to be done to support categories for flags
but we will see if that works. It also forces the scripts to use python2
since they blow up under python3 which is becoming the default python on
many linux systems.

Small fix to app_test as well so it conforms to the new Flag interface.
2019-01-27 01:41:06 -05:00
Audrius Butkevicius
b67dcf995b
Merge pull request #776 from gliptak/patch-2
Bring Go version current
2018-10-29 21:32:00 +00:00
Audrius Butkevicius
11ab68f24d
Merge branch 'master' into patch-2 2018-10-29 21:19:45 +00:00
Audrius Butkevicius
cbebba941b
Merge pull request #775 from gliptak/patch-1
Correct typo
2018-10-29 21:18:40 +00:00
Gábor Lipták
769f6d543b
Bring Go version current 2018-10-18 21:00:02 -04:00
Gábor Lipták
9587fc27bd
Correct typo 2018-10-18 20:56:13 -04:00
Audrius Butkevicius
934abfb2f1
Merge pull request #758 from vrothberg/fix-short-opts-parsing
short opt handling: fix parsing
2018-08-21 07:40:27 +01:00
Valentin Rothberg
3e5a935ed3 fix go vet warning
command_test.go:342:3 value declared but not used

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-08-21 08:33:42 +02:00
Valentin Rothberg
c23dfba701 short opt handling: fix parsing
Only split a given string (e.g., "-abc") into short options (e.g., "-a",
"-b", "-c") if all those are flags.  To further avoid mistakenly
transform common arguments, catch "flag provided but not defined" errors
to iteratively transform short options.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
Fixes: https://github.com/projectatomic/libpod/issues/714
2018-08-20 12:35:43 +02:00
8e01ec4cd3
Merge pull request #598 from urfave/backport-json-support
Backport JSON InputSource to v1
2018-02-25 22:02:53 -05:00
8dc47eb3cb
Merge branch 'master' into backport-json-support 2018-02-25 16:09:48 -05:00
d4bf9ce860
Merge pull request #498 from urfave/merging-jereksel-zsh
Merging #489 (plus hack)
2018-02-25 16:09:04 -05:00
e59e4743b8
Merge branch 'master' into merging-jereksel-zsh 2018-02-24 22:02:40 -05:00
b09aafdfe9
Merge pull request #681 from urfave/check-run-error-in-readme
Update README examples to check for errors
2018-02-24 22:02:19 -05:00
5fc8124af1
Merge branch 'master' into merging-jereksel-zsh 2018-02-24 21:58:26 -05:00
bc77a15c69
Merge branch 'master' into check-run-error-in-readme 2018-02-24 21:54:06 -05:00
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
45289ea7a0
Adjust contribution and maintainer prose per current reality 2018-02-20 12:40:43 -05:00
59e1ddb43e
Merge branch 'master' into check-run-error-in-readme 2018-02-13 15:27:04 -05: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
Nico Windler
3a87b13b01 Fix args reordering when bool flags are present 2018-02-10 14:00:34 +01: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
Olivier Mengué
d7555e1729 Fix unnecessary uses of Sprintf
- use strconv directly
- use concatenation for "%s%s"
2018-01-26 21:15:37 +01: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
Gábor Lipták
c6eb2a0510
Correct go vet for Go tip
https://travis-ci.org/cloudflare/logshare/jobs/309796141#L646
2017-11-30 19:43:12 -05:00
baude
ceaac7c915 Handle ShortOptions and SkipArgReorder
There was a bug in parsing when both ShortOptions
and SkipArgReorder were being used together.

Signed-off-by: baude <bbaude@redhat.com>
2017-11-29 09:22:26 -06: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
Joshua Rubin
37b7abb1c4
dont clobber slices with envvar
Signed-off-by: Joshua Rubin <jrubin@zvelo.com>
2017-11-21 15:21:31 -07:00
Jesse Szwedko
7ace96b43d
Merge pull request #684 from baude/shortOptionHandling
Combine bool short names
2017-11-15 20:56:12 -08:00
baude
fd5382e7a5 Combine bool short names
Adds the ability to allow the combination of bool
short-name options.  For example,

cmd foobar -ov

This is done through a bool "UseShortOptionHandler" set in
the command struct.

Built upon PR #621

Signed-off-by: baude <bbaude@redhat.com>
2017-11-13 16:29:20 -06:00
Jesse Szwedko
9838c8bcaa Update README examples to check for errors
To encourage good practices.
2017-11-11 17:46:07 -08:00
zhuchensong
43c8c02cf5 Support POSIX-style short flag combining 2017-11-08 16:05:47 -06: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
Jacob McCann
f971fca2b2 Allow FilePath to take []string 2017-10-31 10:43:11 -05:00
Brad Rydzewski
18a556e192 fix FilePath documentation in README.md 2017-10-31 10:29:11 -05:00
Brad Rydzewski
4cc453ba67 document field in README 2017-10-31 10:29:11 -05:00
Brad Rydzewski
c698b821b8 unit tests for load from file 2017-10-31 10:29:11 -05:00
Brad Rydzewski
21fcab0dee ability to load variable from file 2017-10-31 10:29:11 -05:00