Commit Graph

1905 Commits

Author SHA1 Message Date
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
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
Olivier Mengué
d7555e1729 Fix unnecessary uses of Sprintf
- use strconv directly
- use concatenation for "%s%s"
2018-01-26 21:15:37 +01:00
OneOfOne
4960b5b3bc
Merge branch 'v2' of https://github.com/OneOfOne/cli into v2
* 'v2' of https://github.com/OneOfOne/cli:
  Add PathFlag
2018-01-23 19:45:41 +02:00
OneOfOne
10c9734c5e
notes 2018-01-23 19:45:38 +02: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
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
Chris Branch
01b6b9192c altsrc: Parse durations from strings 2017-11-06 11:48:48 +00: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
Jesse Szwedko
7f4b273a05
Merge pull request #676 from rliebz/lexicographic-sort
Consider case when sorting strings
2017-10-30 19:55:34 -07:00
Robert Liebowitz
b44660ac3d Consider case when sorting strings
This makes sorting flags and other sections consistent with how most
command line tools function, by placing both flags `-A` and `-a` before
a flag `-B`.
2017-10-28 03:00:11 -04:00
Jesse Szwedko
7bc6a0acff Merge pull request #628 from phinnaeus/master
Allow custom ExitError handler function
2017-10-14 13:27:26 -07:00
Tyler Davis
40263f4d6a Merge branch 'master' into master 2017-10-13 12:05:14 -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
Sebastian Sprenger
c202606a17 fix golint issues 2017-10-06 07:29:13 +02:00
Sebastian Sprenger
c3cc74dac7 fix ineffective assigns 2017-10-06 07:28:43 +02:00
Sebastian Sprenger
67ee172e6d fix misspelling issue 2017-10-06 07:28:18 +02:00
Jesse Szwedko
b2bf3c5abe Merge pull request #670 from VMitov/path_flag
Add PathFlag
2017-09-28 15:42:40 -07:00
Vladislav Mitov
0b665e6170 Add PathFlag 2017-09-29 00:07:20 +03: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
Tyler Davis
7233c502e3 Merge branch 'master' into master 2017-09-22 10:08:36 -07:00
Robert Liebowitz
cbbe4c1a2c Add tests for custom flag prefix/env hints 2017-09-18 00:44:42 -04:00
rliebz
11d45572f9 Export funcs to configure flag prefix/env hints
This will allow users to customize the prefix section or env hint
section of the flag entries in the help menu without having to
reimplement the rest of the logic required in defining FlagStringer.
2017-09-18 00:00:27 -04:00