Merge master @1.22.1 with v2

commit c71fbcefd2
Merge: 61f3ae3 ef47250
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Thu Sep 12 05:35:50 2019 +0530

    Merge pull request #887 from urfave/asahasrabuddhe-patch-1

    Release 1.22.1

commit ef47250cda
Merge: 71eaf37 61f3ae3
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Thu Sep 12 05:19:58 2019 +0530

    Merge branch 'master' into asahasrabuddhe-patch-1

commit 61f3ae353b
Merge: 388c2dd fa858dc
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Thu Sep 12 05:19:33 2019 +0530

    Merge pull request #890 from urfave/issue-878

    Fix #878

commit fa858dcc26
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Sep 11 15:10:14 2019 +0530

    Ensure flag is not blank

commit f8bb66ae7d
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Sep 11 14:42:38 2019 +0530

    Fix Typo

commit 056aef13fe
Merge: c6ee3b4 82a84fc
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Sep 11 14:37:06 2019 +0530

    Merge branch 'issue-878' of https://github.com/urfave/cli into issue-878

commit c6ee3b4904
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Sep 11 14:34:41 2019 +0530

    Use iterative logic to determine missing flag

commit 82a84fc187
Merge: 1547ac2 388c2dd
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 14:17:11 2019 +0530

    Merge branch 'master' into issue-878

commit 1547ac2f6a
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Sep 11 14:15:20 2019 +0530

    Modify variable names

commit 388c2dd0f4
Merge: e19126a 6d888d6
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 14:13:40 2019 +0530

    Merge pull request #891 from saschagrunert/fish-hidden

    Don't generate fish completion for hidden commands

commit 71eaf37e33
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 14:09:50 2019 +0530

    Update CHANGELOG.md

commit 6d888d693d
Merge: bac5bde e19126a
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 14:04:44 2019 +0530

    Merge branch 'master' into fish-hidden

commit e19126a819
Merge: b207e20 35eb598
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 14:01:44 2019 +0530

    Merge pull request #883 from urfave/remove-flag-generation

    Remove flag generation

commit bac5bde38c
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Wed Sep 11 09:06:02 2019 +0200

    Don't generate fish completion for hidden commands

    Added the missing test case as well.

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit 36cdaa9964
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 10:34:00 2019 +0530

    Update CHANGELOG.md

commit cbb9e015b8
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 09:21:45 2019 +0530

    Improve Code and Add Test Case

commit 7d6a604106
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 08:59:51 2019 +0530

    Fix #878

commit be37c2cbda
Merge: 0aee120 b207e20
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 08:27:45 2019 +0530

    Merge branch 'master' into asahasrabuddhe-patch-1

commit 35eb598d43
Merge: 8575558 b207e20
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 05:39:35 2019 +0530

    Merge branch 'master' into remove-flag-generation

commit 0aee120c32
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 05:37:41 2019 +0530

    Update CHANGELOG.md

commit 5c019b10ca
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Sep 11 05:33:46 2019 +0530

    Update CHANGELOG.md

commit b207e20873
Merge: 249cb33 487be14
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Tue Sep 10 21:28:35 2019 +0100

    Merge pull request #889 from crosbymichael/hidden-man

    Don't output hidden commands for  man pages

commit 487be14dce
Author: Michael Crosby <crosbymichael@gmail.com>
Date:   Tue Sep 10 13:49:11 2019 -0400

    Don't output hidden commands for  man pages

    Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

commit 85755588ac
Merge: 024692c 249cb33
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Tue Sep 10 15:04:12 2019 +0530

    Merge branch 'master' into remove-flag-generation

commit 249cb33392
Merge: bfe2e92 abfb13b
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Tue Sep 10 08:28:09 2019 +0100

    Merge pull request #885 from urfave/go-modules-support

    Go modules support

commit abfb13b854
Merge: 534d60b bfe2e92
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Tue Sep 10 06:56:41 2019 +0530

    Merge branch 'master' into go-modules-support

commit 054fbefec3
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Tue Sep 10 06:42:34 2019 +0530

    Update CHANGELOG.md

commit 534d60bb9b
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Tue Sep 10 06:40:45 2019 +0530

    Bump minimum supported version of Go to 1.11

commit 024692c172
Merge: 4a9e440 bfe2e92
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Tue Sep 10 06:33:21 2019 +0530

    Merge branch 'master' into remove-flag-generation

commit bfe2e925cf
Merge: 3eca109 238c80f
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Tue Sep 10 06:24:10 2019 +0530

    Merge pull request #882 from urfave/lynncyrin-patch-1

    Release 1.22.0

commit 426e21c150
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Mon Sep 9 13:15:47 2019 +0530

    Update .travis.yml

    Set GOPROXY in Travis environment

commit 39bd617664
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Mon Sep 9 08:37:16 2019 +0530

    Cleanup after before_script to avoid git diff errors
    remove windows build

commit edbf66c25c
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Mon Sep 9 08:23:04 2019 +0530

    Update gfmrun import command to suite Go Modules pattern
    Fix test command typo in travis script

commit afd0ecbbf2
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Mon Sep 9 08:19:06 2019 +0530

    Add support for Go 1.13
    Drop support for Go 1.11
    Use md2man v2 to avoid dependency issues when building with Go Modules
    Enabled
    Update TravisCI build environment images (trusty was deprecated)
    Add optional Windows build

commit 4a9e440503
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Mon Sep 9 08:12:09 2019 +0530

    Fix AppVeyor build

commit 5c81af9f10
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Mon Sep 9 07:47:18 2019 +0530

    Remove generate script from travis flow
    Remove unused dependencies from travis script

commit b6c5d17a83
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Mon Sep 9 07:44:07 2019 +0530

    Remove Flag Generation
    Remove Legacy Python Scripts

commit 238c80f9b5
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Sep 7 20:44:48 2019 -0700

    Update CHANGELOG.md

commit 980742b7cc
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Sep 7 20:43:56 2019 -0700

    typo

commit 890d49ca7a
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Sep 7 20:41:44 2019 -0700

    Release 1.22.0

    - adds the changelog for 1.22.0
    - updates the changelog for 1.21.0. some PRs were missed, as was mentioned here https://github.com/urfave/cli/pull/829#issuecomment-517968795
    - closes https://github.com/urfave/cli/issues/867

commit 3eca1090a3
Merge: 38a6c56 4bbff84
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Fri Aug 30 15:53:55 2019 +0100

    Merge pull request #879 from saschagrunert/escape-single-quotes

    Escape single quotes in fish shell completion

commit 4bbff84169
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Thu Aug 29 14:45:32 2019 +0200

    Escape single quotes in fish shell completion

    Single quotes can break the generated fish shell completion and should
    be escaped correctly.

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit 38a6c560b3
Merge: fa6797b 687f721
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Thu Aug 29 20:52:07 2019 +0100

    Merge pull request #857 from saschagrunert/takes-file-fish

    Add `TakesFile` to fish shell completion

commit 687f721eaa
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Mon Aug 26 10:07:50 2019 +0200

    Update function alignment

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit 0c01922a12
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Mon Aug 26 08:46:55 2019 +0200

    Add type switch

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit 38d0ac6296
Author: Sascha Grunert <mail@saschagrunert.de>
Date:   Sun Aug 25 17:50:18 2019 +0200

    Removed GetTakesFile and stick to type assertions

    Signed-off-by: Sascha Grunert <mail@saschagrunert.de>

commit a1cf7f44b6
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Mon Aug 12 09:42:12 2019 +0200

    Add `TakesFile` to fish shell completion

    The new `TakesFile` flag will be now consumed by the fish shell
    completion generator.

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit fa6797beef
Merge: 2344c98 82eb0d7
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 24 18:58:52 2019 -0700

    Merge pull request #876 from urfave/lynncyrin-patch-1

    Bump go version to 1.10 in readme

commit 82eb0d70cb
Merge: edd8cb2 2344c98
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sun Aug 25 01:04:33 2019 +0100

    Merge branch 'master' into lynncyrin-patch-1

commit 2344c98f67
Merge: 55de011 68ee2bc
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sun Aug 25 01:04:17 2019 +0100

    Merge pull request #860 from saschagrunert/takes-file-not-all

    Update `TakesFile` flag to apply only to supported flags

commit edd8cb2068
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 24 14:44:56 2019 -0700

    Bump go version to 1.10 in readme

    Closes https://github.com/urfave/cli/issues/875

commit 68ee2bc4af
Merge: 959d9ec 55de011
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 24 14:34:15 2019 -0700

    Merge branch 'master' into takes-file-not-all

commit 55de011cf8
Merge: 392c1de d3edef8
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sat Aug 24 11:55:28 2019 +0100

    Merge pull request #873 from urfave/show-test-failures

    build: show failures when running tests

commit d3edef887a
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sat Aug 24 11:34:03 2019 +0100

    Update build.go

commit c2d1a13208
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sat Aug 24 03:05:45 2019 -0700

    Revert "check length"

    This reverts commit 1095838cca.

commit 959d9ec36b
Merge: 3681b05 392c1de
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Sat Aug 24 11:23:51 2019 +0200

    Merge branch 'master' into takes-file-not-all

commit 7d62a9d054
Merge: 1095838 392c1de
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 24 00:50:42 2019 -0700

    Merge branch 'master' into show-test-failures

commit 1095838cca
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sat Aug 24 00:49:29 2019 -0700

    check length

commit 29ad6ee6ad
Author: [[ BOT ]] Lynn Cyrin <lynncyrin@gmail.com>
Date:   Fri Aug 23 20:09:08 2019 -0700

    DRY

commit 392c1de1a2
Merge: 23c8303 487c723
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Fri Aug 23 22:51:39 2019 +0100

    Merge pull request #874 from saschagrunert/go-mod-cleanup

    Cleanup go modules

commit 487c723673
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Fri Aug 23 10:28:32 2019 +0200

    Cleanup go modules

    These two dependencies are not really needed, which can be
    reproduced via:

    ```
    > export GO111MODULE=on && go mod tidy
    ```

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit 8469a9de07
Author: [[ BOT ]] Lynn Cyrin <lynncyrin@gmail.com>
Date:   Thu Aug 22 21:42:07 2019 -0700

    show test failures

commit 23c8303026
Merge: ecd576e 6a25af9
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 17 11:24:05 2019 -0700

    Merge pull request #862 from russoj88/UpdateREADME_gopkg.in_v1

    Rewrite the "pinning to v1" section.

commit 6a25af9641
Merge: 3bc62c4 ecd576e
Author: russoj88 <russoj88@users.noreply.github.com>
Date:   Sat Aug 17 10:01:35 2019 -0700

    Merge branch 'master' into UpdateREADME_gopkg.in_v1

commit ecd576e779
Merge: 6cc7e98 e11183f
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sat Aug 17 16:51:43 2019 +0100

    Merge pull request #868 from urfave/lynncyrin-patch-1

    Modernize readme

commit e11183fe50
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 17 02:44:49 2019 -0700

    Modernize readme

    I assume that people no longer care about what the package was named many years ago

commit 3bc62c4fde
Author: russoj88 <russoj88@gmail.com>
Date:   Thu Aug 15 12:30:29 2019 -0700

    Mimic v2 example code from above.

commit 62b8a7cc2c
Author: russoj88 <russoj88@gmail.com>
Date:   Wed Aug 14 11:20:09 2019 -0700

    Add "Using v1 releases" to table of contents.

commit cc091db561
Author: russoj88 <russoj88@users.noreply.github.com>
Date:   Wed Aug 14 11:21:40 2019 -0700

    Update README.md

    Only instruct on right way to use library.

    Co-Authored-By: Lynn Cyrin (they/them) <lynncyrin@gmail.com>

commit f529dad70c
Author: russoj88 <russoj88@users.noreply.github.com>
Date:   Wed Aug 14 11:20:58 2019 -0700

    Update README.md

    Include suggestion to put example in.

    Co-Authored-By: Lynn Cyrin (they/them) <lynncyrin@gmail.com>

commit f2c26bab77
Author: russoj88 <russoj88@gmail.com>
Date:   Tue Aug 13 21:10:38 2019 -0700

    Rewrite the "pinning to v1" section.

commit 3681b057c5
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Tue Aug 13 09:43:57 2019 +0200

    Update `TakesFile` flag to apply only to supported flags

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit 6cc7e987c4
Merge: 7e49cc2 08c24e2
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Mon Aug 12 21:30:37 2019 +0100

    Merge pull request #856 from FaranIdo/master

    Add Subcommand fallback call to ExitErrHandler, fixing #816

commit 08c24e22ed
Author: FaranIdo <idoosbron@gmail.com>
Date:   Mon Aug 12 00:29:46 2019 +0300

    add missing ExitErrHandler in command + matching test, fixing #816

commit 7e49cc210a
Merge: 8b18c71 4e42a2f
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sat Aug 10 09:01:16 2019 +0000

    Merge pull request #848 from saschagrunert/fish-shell

    Add fish shell completion support

commit 4e42a2f02c
Merge: 56d12d0 8b18c71
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sat Aug 10 08:47:31 2019 +0000

    Merge branch 'master' into fish-shell

commit 8b18c71e1a
Merge: 7058c58 c6c2008
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sat Aug 10 08:47:23 2019 +0000

    Merge pull request #851 from saschagrunert/takes-file

    Add `TakesFile` indicator to flag

commit 56d12d0c2f
Merge: 7506b11 7058c58
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Fri Aug 9 17:21:24 2019 +0530

    Merge branch 'master' into fish-shell

commit c6c200864d
Merge: e9e9e0a 7058c58
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Fri Aug 9 13:48:36 2019 +0200

    Merge branch 'master' into takes-file

commit 7058c58eb6
Merge: 2e0e39a de0fa70
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Fri Aug 9 17:16:13 2019 +0530

    Merge pull request #847 from saschagrunert/remove-date-var

    Remove unused `Date` variable from `cliTemplate`

commit de0fa70433
Merge: 0d79d1d 2e0e39a
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Fri Aug 9 12:38:50 2019 +0100

    Merge branch 'master' into remove-date-var

commit e9e9e0ac5d
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Fri Aug 9 09:05:55 2019 +0200

    Add `TakesFile` indicator to flag

    This new member of `Flag` indicates if the flag expects a file as input.
    This is especially useful for documentation and shell completion purposes.

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit 7506b11da7
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Thu Aug 8 15:50:36 2019 +0200

    Add fish shell completion support

    This commit adds a new method `ToFishCompletion` to the `*App` which can
    be used to generate a fish completion string for the application.

    Relates to: #351

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit 2e0e39a03b
Merge: 946f918 aed704a
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Fri Aug 9 10:34:28 2019 +0530

    Merge pull request #845 from urfave/lint-fixes

    linter fixes

commit 0d79d1d9d9
Author: Sascha Grunert <sgrunert@suse.com>
Date:   Thu Aug 8 14:04:21 2019 +0200

    Remove unused `Date` variable from `cliTemplate`

    Signed-off-by: Sascha Grunert <sgrunert@suse.com>

commit aed704a9d0
Merge: 0990ca2 946f918
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Thu Aug 8 14:44:02 2019 +0530

    Merge branch 'master' into lint-fixes

commit 946f918365
Merge: 2c477e7 286133f
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Thu Aug 8 09:13:09 2019 +0100

    Merge pull request #735 from rliebz/combined

    Add app-wide support for combining short flags

commit 0990ca2391
Merge: fdba7e0 2c477e7
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Thu Aug 8 13:36:30 2019 +0530

    Merge branch 'master' into lint-fixes

commit 286133fee5
Merge: 815c29f 2c477e7
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Thu Aug 8 13:33:32 2019 +0530

    Merge branch 'master' into combined

commit 2c477e720e
Merge: e0057bb 99fad61
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Thu Aug 8 08:41:19 2019 +0100

    Merge pull request #830 from saschagrunert/docs-gen

    Add markdown and man page docs generation methods

commit 99fad61ded
Merge: 40d4a25 e0057bb
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Thu Aug 8 07:06:08 2019 +0100

    Merge branch 'master' into docs-gen

commit e0057bb597
Merge: 521735b fd39578
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Thu Aug 8 07:04:25 2019 +0100

    Merge pull request #846 from urfave/asahasrabuddhe-patch-1

    Update README.md

commit 815c29ffc7
Merge: a77c440 521735b
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Thu Aug 8 07:03:49 2019 +0100

    Merge branch 'master' into combined

commit fd395786a2
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Aug 7 21:00:07 2019 +0530

    Update README.md

    remove quotes around coverage badge

commit fdba7e0f8c
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Aug 7 20:14:50 2019 +0530

    linter fixes
    code cleanup
    changing some test code to ensure uniformity

commit 40d4a25a01
Author: Sascha Grunert <mail@saschagrunert.de>
Date:   Sat Aug 3 12:41:50 2019 +0200

    Add markdown and man page docs generation methods

    This adds two new methods to the `App` struct:

    - `ToMarkdown`: creates a markdown documentation string
    - `ToMan`: creates a man page string

    Signed-off-by: Sascha Grunert <mail@saschagrunert.de>

commit 521735b760
Merge: 97179ca 22e1fc8
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Wed Aug 7 12:10:34 2019 +0100

    Merge pull request #844 from urfave/asahasrabuddhe-patch-1

    Update README.md

commit 22e1fc8419
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Aug 7 14:02:52 2019 +0530

    Update README.md

    add codecov.io badge

commit 97179ca390
Merge: b6f7dd9 3a41d6d
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Aug 7 13:58:51 2019 +0530

    Merge pull request #843 from lafriks/patch-1

    Support GoLang 1.10 to 1.12

commit 3a41d6d785
Author: Lauris BH <lauris@nix.lv>
Date:   Wed Aug 7 11:21:31 2019 +0300

    Lower support to GoLang compiler version 1.10

commit 1f4473209d
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Aug 7 13:50:04 2019 +0530

    Update .travis.yml

    support go versions in line with go's release policy

commit e3fa7e8566
Author: Lauris BH <lauris@nix.lv>
Date:   Wed Aug 7 11:06:15 2019 +0300

    Support also GoLang 1.11 compiler

commit b6f7dd9359
Merge: 93392d1 e2de8c7
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Aug 7 13:28:34 2019 +0530

    Merge pull request #836 from urfave/flag-type-generation-golang

    Flag Generation in the CLI

commit e2de8c7458
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Aug 7 12:38:17 2019 +0530

    update readme with correct error message, add 1.12 and 1.11 to travis

commit a77c440b84
Merge: 8d31c5e 93392d1
Author: Robert Liebowitz <rliebz@gmail.com>
Date:   Tue Aug 6 22:33:49 2019 -0400

    Merge branch 'master' into combined

commit 24de27b05e
Merge: c19938f 93392d1
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Wed Aug 7 01:54:44 2019 +0530

    Merge branch 'master' into flag-type-generation-golang

commit c19938fbbf
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Aug 7 01:51:02 2019 +0530

    update ci commands

commit 6ee5b89e03
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Aug 7 01:50:50 2019 +0530

    move build.go to root

commit e8bbb4c3b5
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Wed Aug 7 01:46:22 2019 +0530

    remove unnecessary sprintf

commit 5070d00811
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Tue Aug 6 12:33:33 2019 +0530

    move packages slice to global scope

commit 93392d12e8
Merge: 26945c5 1db0496
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Tue Aug 6 07:59:53 2019 +0100

    Merge pull request #808 from yogeshlonkar/master

    Add support for flags bash completion

commit adfe6a09c1
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Tue Aug 6 12:14:18 2019 +0530

    indenting fix

commit 1db049685a
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Mon Aug 5 20:22:52 2019 +0200

    Fix unused regex

commit 2be2bc755e
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Mon Aug 5 20:18:08 2019 +0200

    Add additional test for log flag completion and comments

commit c3f51bed6f
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Mon Aug 5 17:07:46 2019 +0200

    Fix SC2199: Arrays implicitly concatenate in

commit c5612e8cd2
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Mon Aug 5 16:58:04 2019 +0200

    Fix review comments

commit 8d31c5e167
Author: Robert Liebowitz <rliebz@gmail.com>
Date:   Mon Aug 5 07:05:07 2019 -0400

    Update README.md

    Co-Authored-By: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>

commit 03153b9cf8
Author: Robert Liebowitz <rliebz@gmail.com>
Date:   Mon Aug 5 06:16:30 2019 -0400

    Allow combining short flags globally

commit d6523cf869
Merge: e949dc2 26945c5
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Mon Aug 5 11:00:26 2019 +0200

    Merge branch 'master' into master

commit 26945c58ed
Merge: d09efb5 c25e4ca
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sun Aug 4 12:36:23 2019 -0700

    Merge pull request #823 from xordspar0/master

    Make the exit code example more clear

commit c25e4cab32
Merge: b1a7c50 d09efb5
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sun Aug 4 12:30:28 2019 -0700

    Merge branch 'master' into master

commit ac5c97b418
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 20:45:28 2019 +0530

    add latest assets file

commit 489d92d2e2
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 20:44:15 2019 +0530

    add missing os package

commit a7f0d86509
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 20:33:21 2019 +0530

    add zero mod fs back and commit file with latest ts

commit 798e1f3d3a
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 20:29:53 2019 +0530

    fix spacing issue

commit 7a6f3d4394
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 20:23:32 2019 +0530

    fix tests

commit 58ae5eb590
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 20:06:44 2019 +0530

    move entire build system to go

commit 8547458f1d
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 19:01:47 2019 +0530

    remove zero mod fs

commit d09efb5fbd
Merge: 7745000 1327f58
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sun Aug 4 18:00:11 2019 +0530

    Merge pull request #837 from urfave/codeowners

    Use codeowners instead of maintainers

commit 1327f58314
Merge: 9938dec 7745000
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sun Aug 4 17:52:42 2019 +0530

    Merge branch 'master' into codeowners

commit e949dc2cc0
Merge: 11c9e59 7745000
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Sun Aug 4 10:38:56 2019 +0200

    Merge branch 'master' into master

commit 4b0a410463
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 12:26:48 2019 +0530

    fix travis build

commit fb4cea5f30
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 12:22:45 2019 +0530

    add new generation logic to travis

commit 365557021f
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 12:17:27 2019 +0530

    remove legacy version check code

commit b6bfbe97f8
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 12:16:07 2019 +0530

    update appveyor to go 1.11, add support for code coverage generation in tests

commit 826954c979
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 11:09:34 2019 +0530

    update app name and remove version

commit 04948f2152
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 11:06:19 2019 +0530

    generate test with go generate

commit 86e10211de
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 11:05:50 2019 +0530

    remove redundant go generate from altsrc
    update go generate in cli package to generate both files
    regeneration test

commit c676ed4caa
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 11:04:23 2019 +0530

    indentation fixes in template
    regeneration test

commit c4fc88e46d
Merge: 2a08494 9260850
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 10:29:34 2019 +0530

    Merge branch 'flag-type-generation-golang' of https://github.com/urfave/cli into flag-type-generation-golang

commit 2a084945a4
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 10:28:08 2019 +0530

    move around code
    change package to flag-gen to avoid conflict with flag-generator binary
    test code generation

commit 065fe9e9af
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 10:05:44 2019 +0530

    change structure to embed source json and template files
    restructure code to have defaults in place of choices

commit d1ded77768
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sun Aug 4 08:45:29 2019 +0530

    rename utility from fg > flag-generator

commit 7745000a0e
Merge: e6cf83e 81acbeb
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sun Aug 4 08:15:00 2019 +0530

    Merge pull request #774 from whereswaldon/patch-1

    Clarify that altsrc supports both TOML and JSON

commit 81acbeb629
Merge: 8abc5a2 e6cf83e
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sun Aug 4 08:12:24 2019 +0530

    Merge branch 'master' into patch-1

commit e6cf83ec39
Merge: 244eba7 eee6ce8
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 3 19:37:52 2019 -0700

    Merge pull request #829 from urfave/lynncyrin-patch-2

    Release 1.21.0

commit 8abc5a2e49
Merge: b2421d1 244eba7
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sun Aug 4 08:04:13 2019 +0530

    Merge branch 'master' into patch-1

commit 9938dec695
Author: [[ BOT ]] Lynn Cyrin <lynncyrin@gmail.com>
Date:   Sat Aug 3 10:26:07 2019 -0700

    update contributing docs

commit 97dbddb32d
Author: [[ BOT ]] Lynn Cyrin <lynncyrin@gmail.com>
Date:   Sat Aug 3 10:23:29 2019 -0700

    use codeowners instead of maintainers

commit 92608509a4
Merge: d209be3 244eba7
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sat Aug 3 22:49:24 2019 +0530

    Merge branch 'master' into flag-type-generation-golang

commit d209be3245
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sat Aug 3 22:32:36 2019 +0530

    update go generate command
    test file generation

commit add69c7d4f
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sat Aug 3 22:16:25 2019 +0530

    updated flag types generated courtesy fg cli

commit c133a5aeb1
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sat Aug 3 22:15:43 2019 +0530

    add explicit true/false choices for value and dest keys due to go default false for bool types

commit 16c7a60528
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sat Aug 3 22:14:58 2019 +0530

    finish generation of flag types for altsrc package
    rename package to fg (flag generator)

commit 32ddef5ca7
Author: Ajitem Sahasrabuddhe <ajitem.sahasrabuddhe@perennialsys.com>
Date:   Sat Aug 3 21:48:48 2019 +0530

    finish generation of flag types for cli package

commit 9766be8d3e
Author: mingrammer <mingrammer@gmail.com>
Date:   Thu Mar 7 00:04:18 2019 +0900

    get latest changes from master

commit e01e3c540c
Author: mingrammer <mingrammer@gmail.com>
Date:   Wed Mar 6 23:51:22 2019 +0900

    Fix the unaligned indents for the commands that have no categories

commit b1a7c502eb
Merge: c75a689 244eba7
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 3 09:36:27 2019 -0700

    Merge branch 'master' into master

commit eee6ce83c0
Merge: 8a7f65e 244eba7
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 3 09:06:47 2019 -0700

    Merge branch 'master' into lynncyrin-patch-2

commit 11c9e598b0
Merge: 01ab016 244eba7
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Sat Aug 3 15:52:08 2019 +0200

    Merge branch 'master' into master

commit 244eba7e4c
Merge: 1169906 4627bbe
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sat Aug 3 18:04:31 2019 +0530

    Merge pull request #831 from saschagrunert/go-modules

    Add go module support

commit b2421d1235
Merge: 3e14507 1169906
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sat Aug 3 13:25:34 2019 +0100

    Merge branch 'master' into patch-1

commit 4627bbe109
Author: Sascha Grunert <mail@saschagrunert.de>
Date:   Sat Aug 3 12:55:06 2019 +0200

    Add go module support

    This adds a go.{mod,sum} file to official support go modules.

    Signed-off-by: Sascha Grunert <mail@saschagrunert.de>

commit 1169906f57
Merge: 07c1638 94f4f83
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sat Aug 3 11:02:34 2019 +0100

    Merge pull request #773 from teresy/redundant-nil-check-slice

    Remove redundant nil checks

commit 94f4f83672
Merge: da581b2 07c1638
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Sat Aug 3 02:05:33 2019 -0700

    Merge branch 'master' into redundant-nil-check-slice

commit 07c1638969
Merge: 842e3fe 7a51175
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sat Aug 3 08:47:32 2019 +0530

    Merge pull request #806 from mingrammer/fix-help-indentation

    Fix the unaligned indents for the command help messages

commit 7a51175ce1
Merge: 330a914 842e3fe
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sat Aug 3 08:37:34 2019 +0530

    Merge branch 'master' into fix-help-indentation

commit 842e3fe1b6
Merge: 7675649 fa51d00
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Sat Aug 3 08:12:05 2019 +0530

    Merge pull request #828 from urfave/lynncyrin-patch-1

    Update maintainers for current reality

commit 8a7f65e052
Author: Lynn Cyrin (they/them) <lynn@textio.com>
Date:   Fri Aug 2 19:30:41 2019 -0700

    Update CHANGELOG.md

commit e8eac43d9d
Author: Lynn Cyrin <lynn@textio.com>
Date:   Fri Aug 2 18:26:41 2019 -0700

    Update CHANGELOG.md

commit 330a9143fb
Merge: ddc3453 7675649
Author: Lynn Cyrin <lynn@textio.com>
Date:   Fri Aug 2 18:14:50 2019 -0700

    Merge branch 'master' into fix-help-indentation

commit fa51d00dc6
Author: Lynn Cyrin <lynn@textio.com>
Date:   Fri Aug 2 18:06:15 2019 -0700

    Update maintainers for current reality

commit 01ab016427
Merge: d79d2a0 7675649
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Fri Aug 2 22:03:55 2019 +0200

    Merge branch 'master' into master

commit c75a689f62
Author: Jordan Christiansen <Jordan.Christiansen@target.com>
Date:   Fri Aug 2 14:28:57 2019 -0500

    Make exit code example more clear

    The purpose of this example is to show that you can exit with an error
    code if a flag is unspecified, but with the code as it is, the only way
    to cause a non-zero exit is by adding the flag `--ginger-crouton=false`,
    which is not explained in the example.

    In this new version of the example, running the command with no flag
    will exit with an error, and running it with the flag will exit
    normally.

commit 7675649a17
Merge: 656063a f8ba505
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Fri Aug 2 22:52:32 2019 +0530

    Merge pull request #819 from lynncyrin/required-flags-take-2

    Required flags

commit f8ba505a7c
Merge: 60fb297 656063a
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Fri Aug 2 22:49:29 2019 +0530

    Merge branch 'master' into required-flags-take-2

commit 656063a846
Merge: 693af58 6505336
Author: Ajitem Sahasrabuddhe <ajitem.s@outlook.com>
Date:   Fri Aug 2 22:49:09 2019 +0530

    Merge pull request #788 from benzvan/master

    adds test coverage to context

commit 60fb297232
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 23:27:34 2019 -0700

    remove help assertion stuff

commit d7ec4e8013
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 23:26:43 2019 -0700

    add env var tests

commit f4128a02f3
Author: Lynn Cyrin <lynncyrin@gmail.com>
Date:   Thu Aug 1 22:54:15 2019 -0700

    Update command.go

commit 38f9e1622d
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 22:52:21 2019 -0700

    add environment variable support ๐ŸŽ‰

commit f21b22dd90
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 22:10:18 2019 -0700

    cleanup some issues with error display

commit fdd4d10691
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 21:48:52 2019 -0700

    update comments

commit ef9acb4a3b
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 21:46:56 2019 -0700

    rename cases

commit 45f2b3d8e7
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 21:45:11 2019 -0700

    more test cases

commit 78db152323
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 21:35:15 2019 -0700

    add typed error assertions

commit d4740d10d0
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 20:58:08 2019 -0700

    more test cases

commit 595382c509
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 20:39:37 2019 -0700

    expand test cases

commit 3d6eec825a
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 20:35:23 2019 -0700

    add test cases

commit 7b9e16b6b5
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 20:30:43 2019 -0700

    update test names

commit 95d3a8624d
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 20:27:51 2019 -0700

    update test to reflect app flag usage

commit 714a73f028
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 19:57:14 2019 -0700

    remove unused thing

commit 9438aba3b8
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Aug 1 19:54:57 2019 -0700

    remove showFlagError, we can use the help printer assertion to accomplish the same goal

commit 386b379d19
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sun Jul 28 22:45:43 2019 -0700

    Revert "reset generated flags changes"

    This reverts commit 9ec594d529.

commit 9ec594d529
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sun Jul 28 22:34:07 2019 -0700

    reset generated flags changes

commit 23f09ac1e8
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sun Jul 28 22:19:35 2019 -0700

    cleanup tests, check required flags in more places

commit d79d2a0424
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Wed Jul 24 16:08:47 2019 +0200

    Fix issue with source command completion

    Avoid competion for bash builtin `source` and fallback to default implementation as it throws below error
    ```
    -bash: source: --: invalid option
    source: usage: source filename [arguments]
    ```

commit 7ce0af189e
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 18 00:52:24 2019 -0700

    remove unused code

commit d8985dc6d5
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 18 00:51:16 2019 -0700

    reduce diff

commit 19140e1fb5
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 18 00:48:09 2019 -0700

    show errors

commit 2299852c3c
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 18 00:47:18 2019 -0700

    cleanup subcommand and specs

commit 300288670f
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 18 00:20:32 2019 -0700

    add subcommand

commit cc1cf8c459
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 18 00:09:07 2019 -0700

    wording shift

commit 32d84d8e87
Author: Lynn Cyrin <lynncyrin@gmail.com>
Date:   Wed Jul 17 00:25:13 2019 -0700

    copy update

commit 01d5cfab70
Author: Lynn Cyrin <lynn@textio.com>
Date:   Wed Jul 17 00:20:44 2019 -0700

    use strings.Join

commit cdc7af744e
Author: Lynn Cyrin <lynn@textio.com>
Date:   Wed Jul 17 00:16:40 2019 -0700

    add handling for multiple required flags

commit 9293f5b3cc
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sun Jul 14 21:00:16 2019 -0700

    visually shorten logic

commit f00f35ce8c
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sat Jul 13 14:02:45 2019 -0700

    docs

commit 17108e1db4
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sat Jul 13 13:59:29 2019 -0700

    tabs

commit cf824804c2
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sat Jul 13 13:57:06 2019 -0700

    update tests

commit 80d7e91191
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sat Jul 13 03:51:26 2019 -0700

    fill out test cases

commit 746866c10d
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sat Jul 13 03:44:39 2019 -0700

    add update integration with the help output

commit 550ed20ea4
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sat Jul 13 01:26:47 2019 -0700

    update tests

commit f6777bf4bf
Author: Lynn Cyrin <lynn@textio.com>
Date:   Sat Jul 13 01:03:46 2019 -0700

    quote the flag name

commit 6a2ae78373
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 21:53:10 2019 -0700

    backwards compatible RequiredFlag implementation

commit 922d231891
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 21:28:09 2019 -0700

    ./generate-flag-types cli -i flag-types.json -o flag_generated.go

commit 8a58b7e039
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:47:47 2019 -0700

    remove manual isRequired funcs

commit 62e99ad1c1
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:46:22 2019 -0700

    add IsRequired to generator

commit 310bfeb194
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:44:41 2019 -0700

    add required attr to generator

commit af627c73c3
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:34:17 2019 -0700

    update func name

commit 3d2d6975b4
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:32:42 2019 -0700

    reduce diff

commit 0608059cc7
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:32:15 2019 -0700

    reduce diff

commit 9c299e7e8a
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:28:29 2019 -0700

    reduce diff

commit 30a71dc427
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:25:52 2019 -0700

    update Run command

commit f7d5e2c21e
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:22:16 2019 -0700

    reduce diff

commit e6842c0b75
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:21:05 2019 -0700

    merge in test file

commit fa8187f2ce
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:19:42 2019 -0700

    reduce diff

commit ce1630141e
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:18:52 2019 -0700

    reduce diff???

commit 138dbaafec
Merge: aba73ce 693af58
Author: Lynn Cyrin <lynn@textio.com>
Date:   Thu Jul 11 20:07:55 2019 -0700

    Merge branch 'master' into required_flags

commit da581b24e8
Merge: 6aa7f35 693af58
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Fri Jun 28 07:55:04 2019 +0100

    Merge branch 'master' into redundant-nil-check-slice

commit 65053360c7
Author: Ben Zvan <ben.zvan@target.com>
Date:   Wed Jun 26 09:41:11 2019 -0500

    Revert "Created using Colaboratory"

    This reverts commit 83b99c4109.
    This commit was randomly created here when I connected to colaboratory

commit 83b99c4109
Author: Ben Zvan <ben@zvan.net>
Date:   Tue Jun 25 18:47:58 2019 -0500

    Created using Colaboratory

commit 23042d3707
Merge: 4a76377 693af58
Author: Ben Zvan <ben@zvan.net>
Date:   Fri Jun 14 10:14:07 2019 -0500

    Merge branch 'master' into master

commit 62f02f21ef
Author: Yogesh Lonkar <ylonkar@whitehedge.com>
Date:   Thu Apr 11 10:57:58 2019 +0530

    Don't complete hidden flags

commit 1d7a2b08d6
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Thu Mar 21 13:01:48 2019 +0530

    Add default completion on commands, test cases, refactor code

commit fb1421d903
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Wed Mar 20 21:34:56 2019 +0530

    Fix duplicate completion of existing flag

commit 58a072d573
Author: Yogesh Lonkar <lonkar.yogeshr@gmail.com>
Date:   Wed Mar 20 20:28:51 2019 +0530

    Add bash completion support for flags

commit ddc3453179
Author: mingrammer <mingrammer@gmail.com>
Date:   Thu Mar 7 00:04:18 2019 +0900

    Update README.md

commit a0453b2200
Author: mingrammer <mingrammer@gmail.com>
Date:   Wed Mar 6 23:51:22 2019 +0900

    Fix the unaligned indents for the commands that have no categories

commit 693af58b4d
Merge: e229212 d7c3be8
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sun Feb 3 18:40:40 2019 +0000

    Merge pull request #766 from agis/patch-1

    Fix README typo

commit 6aa7f352fa
Merge: 21dfc6e e229212
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sun Feb 3 18:39:49 2019 +0000

    Merge branch 'master' into redundant-nil-check-slice

commit e229212769
Merge: b67dcf9 5b83c89
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Sun Feb 3 18:37:18 2019 +0000

    Merge pull request #798 from Quasilyte/patch-1

    use type switch instead of if/else

commit 5b83c895a7
Author: Iskander (Alex) Sharipov <quasilyte@gmail.com>
Date:   Tue Jan 29 22:51:02 2019 +0300

    use type switch instead of if/else

    This reduces the syntax noise of the code by
    removing excessive type assertions.

    Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>

commit 4a76377775
Author: Ben Zvan <benjamin.zvan@target.com>
Date:   Wed Dec 26 12:48:12 2018 -0600

    go fmt

commit d63733fe14
Author: Ben Zvan <benjamin.zvan@target.com>
Date:   Wed Dec 26 12:41:27 2018 -0600

    adds test coverage to context

commit b67dcf995b
Merge: cbebba9 11ab68f
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Mon Oct 29 21:32:00 2018 +0000

    Merge pull request #776 from gliptak/patch-2

    Bring Go version current

commit 11ab68f24d
Merge: 769f6d5 cbebba9
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Mon Oct 29 21:19:45 2018 +0000

    Merge branch 'master' into patch-2

commit cbebba941b
Merge: 934abfb 9587fc2
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Mon Oct 29 21:18:40 2018 +0000

    Merge pull request #775 from gliptak/patch-1

    Correct typo

commit 769f6d543b
Author: Gรกbor Liptรกk <gliptak@gmail.com>
Date:   Thu Oct 18 21:00:02 2018 -0400

    Bring Go version current

commit 9587fc27bd
Author: Gรกbor Liptรกk <gliptak@gmail.com>
Date:   Thu Oct 18 20:56:13 2018 -0400

    Correct typo

commit 3e145076ab
Author: Christopher Waldon <christopher.waldon.dev@gmail.com>
Date:   Fri Oct 12 11:30:46 2018 -0400

    Clarify that altsrc supports both TOML and JSON

commit 21dfc6eb83
Author: teresy <hi.teresy@gmail.com>
Date:   Wed Oct 10 14:54:48 2018 -0400

    Remove redundant nil checks

commit d7c3be8267
Author: Agis Anastasopoulos <827224+agis@users.noreply.github.com>
Date:   Tue Aug 21 11:19:37 2018 +0300

    Fix README typo

commit 934abfb2f1
Merge: 8e01ec4 3e5a935
Author: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date:   Tue Aug 21 07:40:27 2018 +0100

    Merge pull request #758 from vrothberg/fix-short-opts-parsing

    short opt handling: fix parsing

commit 3e5a935ed3
Author: Valentin Rothberg <vrothberg@suse.com>
Date:   Tue Aug 21 08:33:42 2018 +0200

    fix `go vet` warning

    command_test.go:342:3 value declared but not used

    Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

commit c23dfba701
Author: Valentin Rothberg <vrothberg@suse.com>
Date:   Thu Jun 28 16:41:02 2018 +0200

    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

commit 8e01ec4cd3
Merge: d4bf9ce 8dc47eb
Author: Dan Buch <dan@meatballhat.com>
Date:   Sun Feb 25 22:02:53 2018 -0500

    Merge pull request #598 from urfave/backport-json-support

    Backport JSON InputSource to v1

commit 8dc47eb3cb
Merge: f551359 d4bf9ce
Author: Dan Buch <dan@meatballhat.com>
Date:   Sun Feb 25 16:09:48 2018 -0500

    Merge branch 'master' into backport-json-support

commit d4bf9ce860
Merge: b09aafd e59e474
Author: Dan Buch <dan@meatballhat.com>
Date:   Sun Feb 25 16:09:04 2018 -0500

    Merge pull request #498 from urfave/merging-jereksel-zsh

    Merging #489 (plus hack)

commit e59e4743b8
Merge: 5fc8124 b09aafd
Author: Dan Buch <dan@meatballhat.com>
Date:   Sat Feb 24 22:02:40 2018 -0500

    Merge branch 'master' into merging-jereksel-zsh

commit b09aafdfe9
Merge: 446f49e bc77a15
Author: Dan Buch <dan@meatballhat.com>
Date:   Sat Feb 24 22:02:19 2018 -0500

    Merge pull request #681 from urfave/check-run-error-in-readme

    Update README examples to check for errors

commit 5fc8124af1
Merge: 688c5a9 446f49e
Author: Dan Buch <dan@meatballhat.com>
Date:   Sat Feb 24 21:58:26 2018 -0500

    Merge branch 'master' into merging-jereksel-zsh

commit bc77a15c69
Merge: 59e1ddb 446f49e
Author: Dan Buch <dan@meatballhat.com>
Date:   Sat Feb 24 21:54:06 2018 -0500

    Merge branch 'master' into check-run-error-in-readme

commit 446f49e78f
Merge: a1c7408 45289ea
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Tue Feb 20 21:16:31 2018 -0800

    Merge pull request #715 from urfave/maintainers-notice

    Adjust contribution and maintainer prose per current reality

commit 45289ea7a0
Author: Dan Buch <dan@meatballhat.com>
Date:   Tue Feb 20 12:40:43 2018 -0500

    Adjust contribution and maintainer prose per current reality

commit 59e1ddb43e
Merge: 9838c8b a1c7408
Author: Dan Buch <dan@meatballhat.com>
Date:   Tue Feb 13 15:27:04 2018 -0500

    Merge branch 'master' into check-run-error-in-readme

commit a1c7408de3
Merge: 803d066 3a87b13
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Sat Feb 10 18:18:39 2018 -0800

    Merge pull request #712 from windler/fix_args_reorder

    Fix args reordering when bool flags are present

commit 3a87b13b01
Author: Nico Windler <nico.windler@gmail.com>
Date:   Sat Feb 10 13:35:23 2018 +0100

    Fix args reordering when bool flags are present

commit 803d066579
Merge: 75104e9 d7555e1
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Fri Feb 2 13:13:18 2018 -0800

    Merge pull request #704 from dolmen/replace-unneeded-Sprintf

    Fix unnecessary uses of Sprintf

commit d7555e1729
Author: Olivier Menguรฉ <dolmen@cpan.org>
Date:   Fri Jan 26 21:14:34 2018 +0100

    Fix unnecessary uses of Sprintf

    - use strconv directly
    - use concatenation for "%s%s"

commit 75104e932a
Merge: 39908eb e38e4ae
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Sat Jan 6 11:10:48 2018 -0800

    Merge pull request #697 from urfave/fix-skip-flag-parsing

    Fix regression of SkipFlagParsing behavior

commit e38e4ae2d0
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Fri Dec 29 13:38:18 2017 -0500

    Fix regression of SkipFlagParsing behavior

    Introduced by df562bf1a8

    Was mistakenly prepending the command name.

commit 39908eb08f
Merge: 119bb65 2610681
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Tue Dec 12 08:34:29 2017 -0800

    Merge pull request #691 from urfave/refactor-686

    Refactor flag handling logic

commit 2610681040
Merge: 0671b16 119bb65
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Mon Dec 11 18:51:46 2017 -0800

    Merge branch 'master' into refactor-686

commit 0671b166dc
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Mon Dec 4 09:23:40 2017 -0800

    Add tests for flag reordering

commit 119bb65648
Merge: c9eba3f c6eb2a0
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Sun Dec 3 13:42:37 2017 -0800

    Merge pull request #690 from gliptak/patch-1

    Correct go vet for Go tip

commit df562bf1a8
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Sun Dec 3 13:38:50 2017 -0800

    Refactor flag handling logic

    Refactor logic introduced by #686

commit c9eba3f37a
Merge: c6af884 ceaac7c
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Sun Dec 3 12:48:28 2017 -0800

    Merge pull request #686 from baude/shortoptionSkipArg

    Handle ShortOptions and SkipArgReorder

commit c6eb2a0510
Author: Gรกbor Liptรกk <gliptak@gmail.com>
Date:   Thu Nov 30 19:43:12 2017 -0500

    Correct go vet for Go tip

    https://travis-ci.org/cloudflare/logshare/jobs/309796141#L646

commit ceaac7c915
Author: baude <bbaude@redhat.com>
Date:   Mon Nov 20 09:32:03 2017 -0600

    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>

commit c6af8847eb
Merge: 7ace96b 37b7abb
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Mon Nov 27 19:55:04 2017 -0800

    Merge pull request #687 from joshuarubin/master

    Don't clobber slices with EnvVar

commit 37b7abb1c4
Author: Joshua Rubin <jrubin@zvelo.com>
Date:   Tue Nov 21 15:21:31 2017 -0700

    dont clobber slices with envvar

    Signed-off-by: Joshua Rubin <jrubin@zvelo.com>

commit 7ace96b43d
Merge: 44cb242 fd5382e
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Wed Nov 15 20:56:12 2017 -0800

    Merge pull request #684 from baude/shortOptionHandling

    Combine bool short names

commit fd5382e7a5
Author: baude <bbaude@redhat.com>
Date:   Mon Nov 13 15:28:23 2017 -0600

    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>

commit 9838c8bcaa
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Sat Nov 11 16:23:24 2017 -0800

    Update README examples to check for errors

    To encourage good practices.

commit 43c8c02cf5
Author: zhuchensong <zhuchensong93@163.com>
Date:   Mon Apr 17 00:47:04 2017 +0800

    Support POSIX-style short flag combining

commit 44cb242eeb
Merge: 7f4b273 f971fca
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Fri Nov 3 19:35:40 2017 -0700

    Merge pull request #675 from jmccann/continue3

    Ability to load variable from file - UPDATED

commit f971fca2b2
Author: Jacob McCann <jacob.mccann2@target.com>
Date:   Thu Oct 26 13:08:03 2017 -0500

    Allow FilePath to take []string

commit 18a556e192
Author: Brad Rydzewski <brad.rydzewski@gmail.com>
Date:   Mon Apr 10 16:45:51 2017 +0200

    fix FilePath documentation in README.md

commit 4cc453ba67
Author: Brad Rydzewski <brad.rydzewski@gmail.com>
Date:   Sat Apr 1 12:55:46 2017 +0900

    document field in README

commit c698b821b8
Author: Brad Rydzewski <brad.rydzewski@gmail.com>
Date:   Sat Apr 1 12:37:06 2017 +0900

    unit tests for load from file

commit 21fcab0dee
Author: Brad Rydzewski <brad.rydzewski@gmail.com>
Date:   Fri Mar 31 16:24:15 2017 +0900

    ability to load variable from file

commit 7f4b273a05
Merge: 7bc6a0a b44660a
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Mon Oct 30 19:55:34 2017 -0700

    Merge pull request #676 from rliebz/lexicographic-sort

    Consider case when sorting strings

commit b44660ac3d
Author: Robert Liebowitz <rliebz@gmail.com>
Date:   Sat Oct 28 03:00:11 2017 -0400

    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`.

commit 7bc6a0acff
Merge: 2997500 40263f4
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Sat Oct 14 13:27:26 2017 -0700

    Merge pull request #628 from phinnaeus/master

    Allow custom ExitError handler function

commit 40263f4d6a
Merge: 7233c50 2997500
Author: Tyler Davis <phinnaeus@users.noreply.github.com>
Date:   Fri Oct 13 12:05:14 2017 -0700

    Merge branch 'master' into master

commit 2997500ba5
Merge: ac24947 c202606
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Sat Oct 7 13:56:23 2017 -0700

    Merge pull request #672 from sierraechobravo/master

    fix go report card issues

commit c202606a17
Author: Sebastian Sprenger <Sebastian.Sprenger@booxware.de>
Date:   Fri Oct 6 07:29:13 2017 +0200

    fix golint issues

commit c3cc74dac7
Author: Sebastian Sprenger <Sebastian.Sprenger@booxware.de>
Date:   Fri Oct 6 07:28:43 2017 +0200

    fix ineffective assigns

commit 67ee172e6d
Author: Sebastian Sprenger <Sebastian.Sprenger@booxware.de>
Date:   Fri Oct 6 07:28:18 2017 +0200

    fix misspelling issue

commit ac249472b7
Merge: 7fb9c86 cbbe4c1
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Mon Sep 25 20:41:18 2017 -0700

    Merge pull request #661 from rliebz/custom-flag-help

    Allow customization of prefixes and environment variable hints in flag help strings

commit 7233c502e3
Merge: 5dc55f2 7fb9c86
Author: Tyler Davis <phinnaeus@users.noreply.github.com>
Date:   Fri Sep 22 10:08:36 2017 -0700

    Merge branch 'master' into master

commit cbbe4c1a2c
Author: Robert Liebowitz <rliebz@gmail.com>
Date:   Mon Sep 18 00:44:42 2017 -0400

    Add tests for custom flag prefix/env hints

commit 11d45572f9
Author: rliebz <rliebz@gmail.com>
Date:   Sat Aug 26 07:42:25 2017 -0400

    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.

commit 7fb9c86b14
Merge: f017f86 1d334f1
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Sun Sep 10 21:08:19 2017 -0700

    Merge pull request #664 from maguro/master

    Add newline before command categories

commit 1d334f10ce
Author: Alan D. Cabrera <adc@toolazydogs.com>
Date:   Fri Sep 8 10:37:48 2017 -0700

    Add newline before command categories

    The simple formatting change adds a nice blank line before each command
    category.  Documentation in README.md is also updated to be more
    accurate.

commit 5dc55f2287
Merge: 10e81ba f017f86
Author: Dan Buch <dan@meatballhat.com>
Date:   Sun Aug 13 12:42:49 2017 -0400

    Merge branch 'master' into master

commit f017f86fcc
Merge: cfb3883 44c6487
Author: Dan Buch <dan@meatballhat.com>
Date:   Sun Aug 13 10:59:49 2017 -0400

    Merge pull request #659 from urfave/define-flag-precedence

    Define flag source precedence in README

commit 44c648739b
Merge: e1fa109 cfb3883
Author: Dan Buch <dan@meatballhat.com>
Date:   Sun Aug 13 10:54:04 2017 -0400

    Merge branch 'master' into define-flag-precedence

commit cfb3883072
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Thu Aug 10 18:42:03 2017 -0700

    Prepare CHANGELOG for v1.20.0 release

commit f5513590f5
Merge: 6a70c4c b99aa81
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Thu Aug 10 18:06:12 2017 -0700

    Merge branch 'master' into backport-json-support

commit e1fa109a31
Author: Jesse Szwedko <jesse.szwedko@gmail.com>
Date:   Thu Aug 10 17:54:24 2017 -0700

    Define flag source precedence in README

    Fixes #646

commit 688c5a9d4f
Merge: 7250c97 4b90d79
Author: Dan Buch <dan@meatballhat.com>
Date:   Thu Aug 3 14:38:20 2017 -0400

    Merge branch 'master' into merging-jereksel-zsh

commit 10e81bacd1
Merge: 5d528e2 4b90d79
Author: Tyler Davis <phinnaeus@users.noreply.github.com>
Date:   Thu Jul 20 12:44:56 2017 -0700

    Merge branch 'master' into master

commit 5d528e2052
Author: Tyler Davis <tyler.davis@gmail.com>
Date:   Wed Jun 28 13:04:09 2017 -0700

    use exit errors in uts

commit 58450552ee
Author: Tyler Davis <tyler.davis@gmail.com>
Date:   Wed Jun 28 12:52:50 2017 -0700

    Add Test

commit 71bdf81f5a
Author: Tyler Davis <tyler.davis@gmail.com>
Date:   Wed Jun 28 10:10:11 2017 -0700

    sigh... fix one more named parameter issue

commit 172bb92059
Author: Tyler Davis <tyler.davis@gmail.com>
Date:   Wed Jun 28 10:07:25 2017 -0700

    fix named parameter issue

commit 530df59178
Author: Tyler Davis <tyler.davis@gmail.com>
Date:   Wed Jun 28 09:52:12 2017 -0700

    Pass context into handleExitCoder

commit 9d61cbad02
Author: Tyler Davis <phinnaeus@users.noreply.github.com>
Date:   Tue Apr 25 12:45:08 2017 -0700

    Updated command.go to use App handleExitCoder

commit ceee6408d5
Author: Tyler Davis <tyler.davis@gmail.com>
Date:   Tue Apr 25 13:02:05 2017 -0700

    Revert "Fix how to do defaults in app.go"

    This reverts commit 8906567dc2ad52fd31c50cf02fa606505a1323ba.

commit 80b09a4d11
Author: Tyler Davis <phinnaeus@users.noreply.github.com>
Date:   Tue Apr 25 11:20:41 2017 -0700

    Fix how to do defaults in app.go

commit 827da610b4
Author: Tyler Davis <phinnaeus@users.noreply.github.com>
Date:   Tue Apr 25 09:33:54 2017 -0700

    Add a bit more documentation

commit 538742687b
Author: Tyler Davis <phinnaeus@users.noreply.github.com>
Date:   Tue Apr 25 09:31:53 2017 -0700

    Add ExitErrHandlerFunc type

commit c48a829640
Author: Tyler Davis <phinnaeus@users.noreply.github.com>
Date:   Tue Apr 25 09:29:43 2017 -0700

    Allow custom exit err handlers

commit 6a70c4cc92
Author: John Weldon <johnweldon4@gmail.com>
Date:   Sat Jul 2 12:35:48 2016 -0700

    Add JSON InputSource to altsrc package

     - Implement NewJSONSource* functions for returning an InputSource from
       various JSON data sources.
     - Copy and modify YAML tests for the JSON InputSource

    Changes:

    * Reverted the method calls and structs to match the v1 interface

commit 7250c97913
Merge: 363d9c9 0bdedde
Author: Dan Buch <dan@meatballhat.com>
Date:   Wed Dec 21 15:11:00 2016 -0500

    Merge branch 'master' into merging-jereksel-zsh

commit 363d9c9a31
Author: Dan Buch <daniel.buch@gmail.com>
Date:   Sun Jul 24 17:29:13 2016 -0400

    Add a hack so that zsh completion only runs for zsh

commit 1cbb9a7f30
Merge: e43a9fb ceeebab
Author: Dan Buch <daniel.buch@gmail.com>
Date:   Sun Jul 24 17:12:43 2016 -0400

    Merge branch 'zsh' of https://github.com/jereksel/cli into jereksel-zsh

commit ceeebaba04
Author: Andrzej Ressel <jereksel@gmail.com>
Date:   Thu Jul 21 00:02:16 2016 +0200

    [PoC] Improve zsh autocompletions

commit aba73cedac
Author: jhowarth <jhowarth@riotgames.com>
Date:   Tue Mar 3 14:02:42 2015 -0800

    Copy the writer of the App to the subcommand App

commit a6482d2687
Merge: b5844af 50c77ec
Author: jhowarth <jhowarth@riotgames.com>
Date:   Mon Mar 2 15:21:01 2015 -0800

    Merge remote-tracking branch 'upstream/master'

    Conflicts:
    	app.go
    	command.go
    	flag.go

commit b5844af298
Merge: 8f1fb06 145da32
Author: Jesse Howarth <jahowarth@gmail.com>
Date:   Mon Mar 2 14:53:57 2015 -0800

    Merge pull request #2 from ivey/requiredFlags

    Required flags

commit 145da3210f
Author: jhowarth <jhowarth@riotgames.com>
Date:   Mon Mar 2 12:06:42 2015 -0800

    don't require flags when the help flag is included

commit 6023f370c1
Author: jhowarth <jhowarth@riotgames.com>
Date:   Mon Mar 2 12:00:21 2015 -0800

    dry error messages

commit e67e05f617
Author: jhowarth <jhowarth@riotgames.com>
Date:   Mon Mar 2 11:56:29 2015 -0800

    DRY error handling

commit cbd95292ac
Author: jhowarth <jhowarth@riotgames.com>
Date:   Mon Mar 2 11:18:59 2015 -0800

    Remove debugging

commit 8f1fb06a58
Merge: 9908e96 4b2fcdb
Author: Jesse Howarth <jahowarth@gmail.com>
Date:   Tue Dec 2 15:23:01 2014 -0800

    Merge pull request #1 from ivey/required_flags

    Required flags

commit 4b2fcdb1ad
Author: Jesse Howarth and Michael Ivey <datdevs+jhowarth+michael.ivey@riotgames.com>
Date:   Tue Dec 2 21:08:24 2014 +0000

    Add tests for required flags

commit 73e64a14fd
Author: Jesse Howarth and Michael Ivey <datdevs+jhowarth+michael.ivey@riotgames.com>
Date:   Tue Dec 2 19:02:56 2014 +0000

    Add (required) to help of flags that are required.

commit 7e05320026
Author: Jesse Howarth and Michael Ivey <datdevs+jhowarth+michael.ivey@riotgames.com>
Date:   Tue Dec 2 17:44:55 2014 +0000

    Implement required flags
main
Ajitem Sahasrabuddhe 5 years ago
parent b626059537
commit c75fee9224
No known key found for this signature in database
GPG Key ID: 782DEBC01D3967A5

@ -0,0 +1,4 @@
# See https://help.github.com/articles/about-codeowners/
# for more info about CODEOWNERS file
* @urfave/cli

1
.gitignore vendored

@ -1,2 +1,3 @@
*.coverprofile
node_modules/
vendor

@ -1,28 +1,35 @@
language: go
sudo: false
dist: trusty
osx_image: xcode8.3
go: 1.11.x
dist: bionic
osx_image: xcode10
go:
- 1.11.x
- 1.12.x
- 1.13.x
os:
- linux
- osx
- linux
- osx
env:
GO111MODULE=on
GOPROXY=https://proxy.golang.org
cache:
directories:
- node_modules
- node_modules
before_script:
- if [[ $(uname) == Darwin ]]; then
sudo pip2 install flake8;
else
pip install --user flake8;
fi
- mkdir -p ${GOPATH%%:*}/src/gopkg.in/urfave
- rm -rvf ${GOPATH%%:*}/src/gopkg.in/urfave/cli.v2
- rm -rvf ${GOPATH%%:*}/pkg/*/gopkg.in/urfave/cli.v2.a
- ln -sv ${TRAVIS_BUILD_DIR} ${GOPATH%%:*}/src/gopkg.in/urfave/cli.v2
- go get github.com/urfave/gfmrun/cmd/gfmrun
- go get golang.org/x/tools/cmd/goimports
- npm install markdown-toc
- go mod tidy
script:
- flake8 runtests cli-v1-to-v2 generate-flag-types
- make all
- go run build.go vet
- go run build.go test
- go run build.go gfmrun
- go run build.go toc
after_success:
- bash <(curl -s https://codecov.io/bash)

@ -39,11 +39,110 @@
### Removed
## [1.22.1] - 2019-09-11
### Fixed
### Deprecated
* Hide output of hidden commands on man pages in [urfave/cli/pull/889](https://github.com/urfave/cli/pull/889) via [@crosbymichael](https://github.com/crosbymichael)
* Don't generate fish completion for hidden commands [urfave/cli/pull/891](https://github.com/urfave/891) via [@saschagrunert](https://github.com/saschagrunert)
* Using short flag names for required flags throws an error in [urfave/cli/pull/890](https://github.com/urfave/cli/pull/890) via [@asahasrabuddhe](https://github.com/asahasrabuddhe)
### Changed
* Remove flag code generation logic, legacy python test runner in [urfave/cli/pull/883](https://github.com/urfave/cli/pull/883) via [@asahasrabuddhe](https://github.com/asahasrabuddhe)
* Enable Go Modules support, drop support for `Go 1.10` add support for `Go 1.13` in [urfave/cli/pull/885](https://github.com/urfave/cli/pull/885) via [@asahasrabuddhe](https://github.com/asahasrabuddhe)
## [1.22.0] - 2019-09-07
### Fixed
* Fix Subcommands not falling back to `app.ExitEventHandler` in [urfave/cli/pull/856](https://github.com/urfave/cli/pull/856) via [@FaranIdo](https://github.com/FaranIdo)
### Changed
* Clarify that altsrc supports both TOML and JSON in [urfave/cli/pull/774](https://github.com/urfave/cli/pull/774) via [@whereswaldon](https://github.com/whereswaldon)
* Made the exit code example more clear in [urfave/cli/pull/823](https://github.com/urfave/cli/pull/823) via [@xordspar0](https://github.com/xordspar0)
* Removed the use of python for internal flag generation in [urfave/cli/pull/836](https://github.com/urfave/cli/pull/836) via [@asahasrabuddhe](https://github.com/asahasrabuddhe)
* Changed the supported go versions to `1.10`, `1.11`, `1.12` in [urfave/cli/pull/843](https://github.com/urfave/cli/pull/843) via [@lafriks](https://github.com/lafriks)
* Changed the v1 releases section in the readme in [urfave/cli/pull/862](https://github.com/urfave/cli/pull/862) via [@russoj88](https://github.com/russoj88)
* Cleaned up go modules in [urfave/cli/pull/874](https://github.com/urfave/cli/pull/874) via [@saschagrunert](https://github.com/saschagrunert)
### Added
* Added `UseShortOptionHandling` for combining short flags in [urfave/cli/pull/735](https://github.com/urfave/cli/pull/735) via [@rliebz](https://github.com/rliebz)
* Added support for flags bash completion in [urfave/cli/pull/808](https://github.com/urfave/cli/pull/808) via [@yogeshlonkar](https://github.com/yogeshlonkar)
* Added the `TakesFile` indicator to flag in [urfave/cli/pull/851](https://github.com/urfave/cli/pull/851) via [@saschagrunert](https://github.com/saschagrunert)
* Added fish shell completion support in [urfave/cli/pull/848](https://github.com/urfave/cli/pull/848) via [@saschagrunert](https://github.com/saschagrunert)
## [1.21.0] - 2019-08-02
### Fixed
* Fix using "slice" flag types with `EnvVar` in [urfave/cli/pull/687](https://github.com/urfave/cli/pull/687) via [@joshuarubin](https://github.com/joshuarubin)
* Fix regression of `SkipFlagParsing` behavior in [urfave/cli/pull/697](https://github.com/urfave/cli/pull/697) via [@jszwedko](https://github.com/jszwedko)
* Fix handling `ShortOptions` and `SkipArgReorder` in [urfave/cli/pull/686](https://github.com/urfave/cli/pull/686) via [@baude](https://github.com/baude)
* Fix args reordering when bool flags are present in [urfave/cli/pull/712](https://github.com/urfave/cli/pull/712) via [@windler](https://github.com/windler)
* Fix parsing of short options in [urfave/cli/pull/758](https://github.com/urfave/cli/pull/758) via [@vrothberg](https://github.com/vrothberg)
* Fix unaligned indents for the command help messages in [urfave/cli/pull/806](https://github.com/urfave/cli/pull/806) via [@mingrammer](https://github.com/mingrammer)
### Changed
* Cleaned up help output in [urfave/cli/pull/664](https://github.com/urfave/cli/pull/664) via [@maguro](https://github.com/maguro)
* Remove redundant nil checks in [urfave/cli/pull/773](https://github.com/urfave/cli/pull/773) via [@teresy](https://github.com/teresy)
* Case is now considered when sorting strings in [urfave/cli/pull/676](https://github.com/urfave/cli/pull/676) via [@rliebz](https://github.com/rliebz)
### Added
* Added _"required flags"_ support in [urfave/cli/pull/819](https://github.com/urfave/cli/pull/819) via [@lynncyrin](https://github.com/lynncyrin/)
* Backport JSON `InputSource` to v1 in [urfave/cli/pull/598](https://github.com/urfave/cli/pull/598) via [@jszwedko](https://github.com/jszwedko)
* Allow more customization of flag help strings in [urfave/cli/pull/661](https://github.com/urfave/cli/pull/661) via [@rliebz](https://github.com/rliebz)
* Allow custom `ExitError` handler function in [urfave/cli/pull/628](https://github.com/urfave/cli/pull/628) via [@phinnaeus](https://github.com/phinnaeus)
* Allow loading a variable from a file in [urfave/cli/pull/675](https://github.com/urfave/cli/pull/675) via [@jmccann](https://github.com/jmccann)
* Allow combining short bool names in [urfave/cli/pull/684](https://github.com/urfave/cli/pull/684) via [@baude](https://github.com/baude)
* Added test coverage to context in [urfave/cli/pull/788](https://github.com/urfave/cli/pull/788) via [@benzvan](https://github.com/benzvan)
* Added go module support in [urfave/cli/pull/831](https://github.com/urfave/cli/pull/831) via [@saschagrunert](https://github.com/saschagrunert)
## [1.20.0] - 2017-08-10
### Fixed
* `HandleExitCoder` is now correctly iterates over all errors in
a `MultiError`. The exit code is the exit code of the last error or `1` if
there are no `ExitCoder`s in the `MultiError`.
* Fixed YAML file loading on Windows (previously would fail validate the file path)
* Subcommand `Usage`, `Description`, `ArgsUsage`, `OnUsageError` correctly
propogated
* `ErrWriter` is now passed downwards through command structure to avoid the
need to redefine it
* Pass `Command` context into `OnUsageError` rather than parent context so that
all fields are avaiable
* Errors occuring in `Before` funcs are no longer double printed
* Use `UsageText` in the help templates for commands and subcommands if
defined; otherwise build the usage as before (was previously ignoring this
field)
* `IsSet` and `GlobalIsSet` now correctly return whether a flag is set if
a program calls `Set` or `GlobalSet` directly after flag parsing (would
previously only return `true` if the flag was set during parsing)
### Changed
* No longer exit the program on command/subcommand error if the error raised is
not an `OsExiter`. This exiting behavior was introduced in 1.19.0, but was
determined to be a regression in functionality. See [the
PR](https://github.com/urfave/cli/pull/595) for discussion.
### Added
### Security
* `CommandsByName` type was added to make it easy to sort `Command`s by name,
alphabetically
* `altsrc` now handles loading of string and int arrays from TOML
* Support for definition of custom help templates for `App` via
`CustomAppHelpTemplate`
* Support for arbitrary key/value fields on `App` to be used with
`CustomAppHelpTemplate` via `ExtraInfo`
* `HelpFlag`, `VersionFlag`, and `BashCompletionFlag` changed to explictly be
`cli.Flag`s allowing for the use of custom flags satisfying the `cli.Flag`
interface to be used.
## [1.19.1] - 2016-11-21
### Fixed
@ -403,7 +502,13 @@ signature of `func(*cli.Context) error`, as defined by `cli.ActionFunc`.
### Added
- Initial implementation.
[Unreleased]: https://github.com/urfave/cli/compare/v1.18.0...HEAD
[Unreleased]: https://github.com/urfave/cli/compare/v1.22.1...HEAD
[1.22.1]: https://github.com/urfave/cli/compare/v1.22.0...v1.22.1
[1.22.0]: https://github.com/urfave/cli/compare/v1.21.0...v1.22.0
[1.21.0]: https://github.com/urfave/cli/compare/v1.20.0...v1.21.0
[1.20.0]: https://github.com/urfave/cli/compare/v1.19.1...v1.20.0
[1.19.1]: https://github.com/urfave/cli/compare/v1.19.0...v1.19.1
[1.19.0]: https://github.com/urfave/cli/compare/v1.18.0...v1.19.0
[1.18.0]: https://github.com/urfave/cli/compare/v1.17.0...v1.18.0
[1.17.0]: https://github.com/urfave/cli/compare/v1.16.0...v1.17.0
[1.16.0]: https://github.com/urfave/cli/compare/v1.15.0...v1.16.0

@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting Dan Buch at dan@meatballhat.com. All complaints will be
reviewed and investigated and will result in a response that is deemed necessary
and appropriate to the circumstances. The project team is obligated to maintain
confidentiality with regard to the reporter of an incident. Further details of
specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org

@ -0,0 +1,18 @@
## Contributing
Use @urfave/cli to ping the maintainers.
Feel free to put up a pull request to fix a bug or maybe add a feature. We will
give it a code review and make sure that it does not break backwards
compatibility. If collaborators agree that it is in line with
the vision of the project, we will work with you to get the code into
a mergeable state and merge it into the master branch.
If you have contributed something significant to the project, we will most
likely add you as a collaborator. As a collaborator you are given the ability
to merge others pull requests. It is very important that new code does not
break existing code, so be careful about what code you do choose to merge.
If you feel like you have contributed to the project but have not yet been added
as a collaborator, we probably forgot to add you :sweat_smile:. Please open an
issue!

@ -3,15 +3,11 @@ cli
[![Build Status](https://travis-ci.org/urfave/cli.svg?branch=master)](https://travis-ci.org/urfave/cli)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/rtgk5xufi932pb2v?svg=true)](https://ci.appveyor.com/project/urfave/cli)
[![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://godoc.org/github.com/urfave/cli)
[![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-urfave-cli)
[![Go Report Card](https://goreportcard.com/badge/urfave/cli)](https://goreportcard.com/report/urfave/cli)
[![top level coverage](https://gocover.io/_badge/github.com/urfave/cli?0 "top level coverage")](http://gocover.io/github.com/urfave/cli) /
[![altsrc coverage](https://gocover.io/_badge/github.com/urfave/cli/altsrc?0 "altsrc coverage")](http://gocover.io/github.com/urfave/cli/altsrc)
**Notice:** This is the library formerly known as
`github.com/codegangsta/cli` -- Github will automatically redirect requests
to this repository, but we recommend updating your references for clarity.
[![codecov](https://codecov.io/gh/urfave/cli/branch/master/graph/badge.svg)](https://codecov.io/gh/urfave/cli)
cli is a simple, fast, and fun package for building command line apps in Go. The
goal is to enable developers to write fast and distributable command line
@ -23,7 +19,7 @@ applications in an expressive way.
- [Installation](#installation)
* [Supported platforms](#supported-platforms)
* [Using the `v2` branch](#using-the-v2-branch)
* [Pinning to the `v1` releases](#pinning-to-the-v1-releases)
* [Using `v1` releases](#using-v1-releases)
- [Getting Started](#getting-started)
- [Examples](#examples)
* [Arguments](#arguments)
@ -32,12 +28,22 @@ applications in an expressive way.
+ [Alternate Names](#alternate-names)
+ [Ordering](#ordering)
+ [Values from the Environment](#values-from-the-environment)
+ [Values from files](#values-from-files)
+ [Values from alternate input sources (YAML, TOML, and others)](#values-from-alternate-input-sources-yaml-toml-and-others)
<<<<<<< HEAD
+ [Default Values for help output](#default-values-for-help-output)
* [Subcommands](#subcommands)
* [Subcommands categories](#subcommands-categories)
* [Exit code](#exit-code)
* [Shell Completion](#shell-completion)
=======
+ [Precedence](#precedence)
* [Subcommands](#subcommands)
* [Subcommands categories](#subcommands-categories)
* [Exit code](#exit-code)
* [Combining short options](#combining-short-options)
* [Bash Completion](#bash-completion)
>>>>>>> master
+ [Enabling](#enabling)
+ [Distribution](#distribution)
+ [Customization](#customization)
@ -62,12 +68,12 @@ organized, and expressive!
## Installation
Make sure you have a working Go environment. Go version 1.2+ is supported. [See
Make sure you have a working Go environment. Go version 1.10+ is supported. [See
the install instructions for Go](http://golang.org/doc/install.html).
To install cli, simply run:
```
$ go get github.com/urfave/cli
$ go get github.com/urfave/cli/v2
```
Make sure your `PATH` includes the `$GOPATH/bin` directory so your commands can
@ -91,21 +97,21 @@ the new `master` branch once development there has settled down. The current
`master` branch (mirrored as `v1`) is being manually merged into `v2` on
an irregular human-based schedule, but generally if one wants to "upgrade" to
`v2` *now* and accept the volatility (read: "awesomeness") that comes along with
that, please use whatever version pinning of your preference, such as via
`gopkg.in`:
that, please use:
```
$ go get gopkg.in/urfave/cli.v2
$ go get github.com/urfave/cli/v2
```
``` go
...
import (
"gopkg.in/urfave/cli.v2" // imports as package "cli"
"github.com/urfave/cli/v2" // imports as package "cli"
)
...
```
<<<<<<< HEAD
**NOTE**: There is a [migrator (python) script](./cli-v1-to-v2) available to aid
with the transition from the v1 to v2 API.
@ -114,20 +120,22 @@ with the transition from the v1 to v2 API.
Similarly to the section above describing use of the `v2` branch, if one wants
to avoid any unexpected compatibility pains once `v2` becomes `master`, then
pinning to `v1` is an acceptable option, e.g.:
=======
### Using `v1` releases
>>>>>>> master
```
$ go get gopkg.in/urfave/cli.v1
$ go get github.com/urfave/cli
```
``` go
```go
...
import (
"gopkg.in/urfave/cli.v1" // imports as package "cli"
"github.com/urfave/cli/v2"
)
...
```
This will pull the latest tagged `v1` release (e.g. `v1.18.1` at the time of writing).
## Getting Started
@ -142,9 +150,10 @@ discovery. So a cli app can be as little as one line of code in `main()`.
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -163,9 +172,10 @@ package main
import (
"fmt"
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -178,7 +188,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -202,9 +215,10 @@ package main
import (
"fmt"
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -217,7 +231,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -266,9 +283,10 @@ package main
import (
"fmt"
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -279,7 +297,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -295,9 +316,10 @@ package main
import (
"fmt"
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -323,7 +345,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -337,10 +362,11 @@ scanned.
package main
import (
"log"
"os"
"fmt"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -369,7 +395,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -390,9 +419,10 @@ For example this:
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -406,7 +436,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -432,9 +465,10 @@ list for the `Name`. e.g.
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -449,7 +483,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -473,10 +510,11 @@ For example this:
package main
import (
"log"
"os"
"sort"
"github.com/urfave/cli"
"github.com/urfave/cli/v2"
)
func main() {
@ -515,7 +553,10 @@ func main() {
sort.Sort(cli.FlagsByName(app.Flags))
sort.Sort(cli.CommandsByName(app.Commands))
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -538,9 +579,10 @@ You can also have the default value set from the environment via `EnvVars`. e.g
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -556,7 +598,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -571,9 +616,10 @@ resolves is used as the default.
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -589,10 +635,52 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
#### Values from files
You can also have the default value set from file via `FilePath`. e.g.
<!-- {
"args": ["&#45;&#45;help"],
"output": "password for the mysql database"
} -->
``` go
package main
import (
"log"
"os"
"github.com/urfave/cli/v2"
)
func main() {
app := cli.NewApp()
app.Flags = []cli.Flag {
cli.StringFlag{
Name: "password, p",
Usage: "password for the mysql database",
FilePath: "/etc/mysql/password",
},
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
Note that default values set from file (e.g. `FilePath`) take precedence over
default values set from the environment (e.g. `EnvVar`).
#### Values from alternate input sources (YAML, TOML, and others)
There is a separate package altsrc that adds support for getting flag values
@ -600,6 +688,7 @@ from other file input sources.
Currently supported input source formats:
* YAML
* JSON
* TOML
In order to get values for a flag from an alternate input source the following
@ -622,9 +711,9 @@ the yaml input source for any flags that are defined on that command. As a note
the "load" flag used would also have to be defined on the command flags in order
for this code snipped to work.
Currently only the aboved specified formats are supported but developers can
add support for other input sources by implementing the
altsrc.InputSourceContext for their given sources.
Currently only YAML, JSON, and TOML files are supported but developers can add support
for other input sources by implementing the altsrc.InputSourceContext for their
given sources.
Here is a more complete sample of a command using YAML support:
@ -637,10 +726,11 @@ package notmain
import (
"fmt"
"log"
"os"
"gopkg.in/urfave/cli.v2"
"gopkg.in/urfave/cli.v2/altsrc"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
)
func main() {
@ -678,7 +768,7 @@ package main
import (
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -693,7 +783,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -703,6 +796,14 @@ Will result in help output like:
--port value Use a randomized port (default: random)
```
#### Precedence
The precedence for flag value sources is as follows (highest to lowest):
0. Command line flag value from user
0. Environment variable (if specified)
0. Configuration file (if specified)
0. Default defined on the flag
### Subcommands
@ -717,9 +818,10 @@ package main
import (
"fmt"
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -769,7 +871,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -785,9 +890,10 @@ E.g.
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -807,7 +913,10 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -815,7 +924,7 @@ Will include:
```
COMMANDS:
noop
noop
Template actions:
add
@ -828,14 +937,17 @@ Calling `App.Run` will not automatically call `os.Exit`, which means that by
default the exit code will "fall through" to being `0`. An explicit exit code
may be set by returning a non-nil error that fulfills `cli.ExitCoder`, *or* a
`cli.MultiError` that includes an error that fulfills `cli.ExitCoder`, e.g.:
<!-- {
"error": "Ginger croutons are not in the soup"
} -->
``` go
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -855,13 +967,86 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
### Shell Completion
### Combining short options
Traditional use of options using their shortnames look like this:
```
$ cmd -s -o -m "Some message"
```
Suppose you want users to be able to combine options with their shortnames. This
can be done using the `UseShortOptionHandling` bool in your app configuration,
or for individual commands by attaching it to the command configuration. For
example:
<!-- {
"args": ["short", "&#45;som", "Some message"],
"output": "serve: true\noption: true\nmessage: Some message\n"
} -->
``` go
package main
import (
"fmt"
"log"
"os"
"github.com/urfave/cli/v2"
)
func main() {
app := &cli.App{}
app.UseShortOptionHandling = true
app.Commands = []*cli.Command{
{
Name: "short",
Usage: "complete a task on the list",
Flags: []cli.Flag{
cli.BoolFlag{Name: "serve, s"},
cli.BoolFlag{Name: "option, o"},
cli.StringFlag{Name: "message, m"},
},
Action: func(c *cli.Context) error {
fmt.Println("serve:", c.Bool("serve"))
fmt.Println("option:", c.Bool("option"))
fmt.Println("message:", c.String("message"))
return nil
},
},
}
You can enable completion commands by setting the `EnableShellCompletion`
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
If your program has any number of bool flags such as `serve` and `option`, and
optionally one non-bool flag `message`, with the short options of `-s`, `-o`,
and `-m` respectively, setting `UseShortOptionHandling` will also support the
following syntax:
```
$ cmd -som "Some message"
```
If you enable `UseShortOptionHandling`, then you must not use any flags that
have a single leading `-` or this will result in failures. For example,
`-option` can no longer be used. Flags with two leading dashes (such as
`--options`) are still valid.
### Bash Completion
You can enable completion commands by setting the `EnableBashCompletion`
flag on the `App` object. By default, this setting will only auto-complete to
show an app's subcommands, but you can write your own completion methods for
the App or its subcommands.
@ -875,16 +1060,17 @@ package main
import (
"fmt"
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
tasks := []string{"cook", "clean", "laundry", "eat", "sleep", "code"}
app := &cli.App{
EnableShellCompletion: true,
EnableBashCompletion: true,
Commands: []*cli.Command{
{
Name: "complete",
@ -894,7 +1080,7 @@ func main() {
fmt.Println("completed task: ", c.Args().First())
return nil
},
ShellComplete: func(c *cli.Context) {
BashComplete: func(c *cli.Context) {
// This will complete if no args are passed
if c.NArg() > 0 {
return
@ -907,23 +1093,19 @@ func main() {
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
#### Enabling
You can generate bash or zsh completion code by using the flag `--init-completion bash` or `--init-completion zsh`.
Source the `autocomplete/bash_autocomplete` file in your .bashrc file while setting the `PROG` variable to the name of your program:
To setup for bash:
```
eval "`myprogram --init-completion bash`"
```
Alternatively, you can put the completion code in your `.bashrc` file:
```
myprogram --init-completion bash >> ~/.bashrc
PROG=myprogram source /.../cli/autocomplete/bash_autocomplete
```
#### Distribution
@ -955,9 +1137,10 @@ The default shell completion flag (`--generate-completion`) is defined as
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -974,7 +1157,10 @@ func main() {
},
},
}
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}
```
@ -1000,10 +1186,11 @@ package main
import (
"fmt"
"log"
"io"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -1042,7 +1229,7 @@ VERSION:
cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
fmt.Println("Ha HA. I pwnd the help!!1")
}
(&cli.App{}).Run(os.Args)
}
```
@ -1058,9 +1245,10 @@ setting `cli.HelpFlag`, e.g.:
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -1069,7 +1257,7 @@ func main() {
Usage: "HALP",
EnvVars: []string{"SHOW_HALP", "HALPPLZ"},
}
(&cli.App{}).Run(os.Args)
}
```
@ -1093,9 +1281,10 @@ setting `cli.VersionFlag`, e.g.:
package main
import (
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func main() {
@ -1103,7 +1292,7 @@ func main() {
Name: "print-version", Aliases: []string{"V"},
Usage: "print only the version",
}
app := &cli.App{
Name: "partay",
Version: "v19.99.0",
@ -1123,9 +1312,10 @@ package main
import (
"fmt"
"log"
"os"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
var (
@ -1136,7 +1326,7 @@ func main() {
cli.VersionPrinter = func(c *cli.Context) {
fmt.Printf("version=%s revision=%s\n", c.App.Version, Revision)
}
app := &cli.App{
Name: "partay",
Version: "v19.99.0",
@ -1165,7 +1355,7 @@ import (
"os"
"time"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
func init() {
@ -1217,7 +1407,7 @@ func (g *genericType) String() string {
}
func main() {
app := cli.App{
app := &cli.App{
Name: "kษ™nหˆtrฤซv",
Version: "v19.99.0",
Compiled: time.Now(),
@ -1406,7 +1596,7 @@ func main() {
app.Writer = &hexWriter{}
app.ErrWriter = &hexWriter{}
}
app.Run(os.Args)
}
@ -1418,16 +1608,4 @@ func wopAction(c *cli.Context) error {
## Contribution Guidelines
Feel free to put up a pull request to fix a bug or maybe add a feature. I will
give it a code review and make sure that it does not break backwards
compatibility. If I or any other collaborators agree that it is in line with
the vision of the project, we will work with you to get the code into
a mergeable state and merge it into the master branch.
If you have contributed something significant to the project, we will most
likely add you as a collaborator. As a collaborator you are given the ability
to merge others pull requests. It is very important that new code does not
break existing code, so be careful about what code you do choose to merge.
If you feel like you have contributed to the project but have not yet been
added as a collaborator, we probably forgot to add you, please open an issue.
See [./CONTRIBUTING.md](./CONTRIBUTING.md)

@ -1,3 +0,0 @@
package altsrc
//go:generate python ../generate-flag-types altsrc -i ../flag-types.json -o flag_generated.go

@ -6,7 +6,7 @@ import (
"strconv"
"syscall"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
// FlagInputSourceExtension is an extension interface of cli.Flag that
@ -72,7 +72,7 @@ func (f *GenericFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourc
}
if value != nil {
for _, name := range f.Names() {
f.set.Set(name, value.String())
_ = f.set.Set(name, value.String())
}
}
}
@ -135,7 +135,7 @@ func (f *BoolFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceCo
}
if value {
for _, name := range f.Names() {
f.set.Set(name, strconv.FormatBool(value))
_ = f.set.Set(name, strconv.FormatBool(value))
}
}
}
@ -153,7 +153,7 @@ func (f *StringFlag) ApplyInputSourceValue(context *cli.Context, isc InputSource
}
if value != "" {
for _, name := range f.Names() {
f.set.Set(name, value)
_ = f.set.Set(name, value)
}
}
}
@ -181,7 +181,7 @@ func (f *PathFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceCo
value = filepath.Join(filepath.Dir(basePathAbs), value)
}
f.set.Set(name, value)
_ = f.set.Set(name, value)
}
}
}
@ -199,7 +199,7 @@ func (f *IntFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceCon
}
if value > 0 {
for _, name := range f.Names() {
f.set.Set(name, strconv.FormatInt(int64(value), 10))
_ = f.set.Set(name, strconv.FormatInt(int64(value), 10))
}
}
}
@ -217,7 +217,7 @@ func (f *DurationFlag) ApplyInputSourceValue(context *cli.Context, isc InputSour
}
if value > 0 {
for _, name := range f.Names() {
f.set.Set(name, value.String())
_ = f.set.Set(name, value.String())
}
}
}
@ -236,7 +236,7 @@ func (f *Float64Flag) ApplyInputSourceValue(context *cli.Context, isc InputSourc
if value > 0 {
floatStr := float64ToString(value)
for _, name := range f.Names() {
f.set.Set(name, floatStr)
_ = f.set.Set(name, floatStr)
}
}
}

@ -2,12 +2,9 @@ package altsrc
import (
"flag"
"gopkg.in/urfave/cli.v2"
"github.com/urfave/cli/v2"
)
// WARNING: This file is generated!
// BoolFlag is the flag type that wraps cli.BoolFlag to allow
// for other values to be specified
type BoolFlag struct {
@ -20,18 +17,11 @@ func NewBoolFlag(fl *cli.BoolFlag) *BoolFlag {
return &BoolFlag{BoolFlag: fl, set: nil}
}
// Apply saves the flagSet for later usage calls, then calls the
// wrapped BoolFlag.Apply
func (f *BoolFlag) Apply(set *flag.FlagSet) {
// Apply saves the flagSet for later usage calls, then calls
// the wrapped BoolFlag.Apply
func (f *BoolFlag) Apply(set *flag.FlagSet) error {
f.set = set
f.BoolFlag.Apply(set)
}
// ApplyWithError saves the flagSet for later usage calls, then calls the
// wrapped BoolFlag.ApplyWithError
func (f *BoolFlag) ApplyWithError(set *flag.FlagSet) error {
f.set = set
return f.BoolFlag.ApplyWithError(set)
return f.BoolFlag.Apply(set)
}
// DurationFlag is the flag type that wraps cli.DurationFlag to allow
@ -46,18 +36,11 @@ func NewDurationFlag(fl *cli.DurationFlag) *DurationFlag {
return &DurationFlag{DurationFlag: fl, set: nil}
}
// Apply saves the flagSet for later usage calls, then calls the
// wrapped DurationFlag.Apply
func (f *DurationFlag) Apply(set *flag.FlagSet) {
f.set = set
f.DurationFlag.Apply(set)
}
// ApplyWithError saves the flagSet for later usage calls, then calls the
// wrapped DurationFlag.ApplyWithError
func (f *DurationFlag) ApplyWithError(set *flag.FlagSet) error {
// Apply saves the flagSet for later usage calls, then calls
// the wrapped DurationFlag.Apply
func (f *DurationFlag) Apply(set *flag.FlagSet) error {
f.set = set
return f.DurationFlag.ApplyWithError(set)
return f.DurationFlag.Apply(set)
}
// Float64Flag is the flag type that wraps cli.Float64Flag to allow
@ -72,18 +55,11 @@ func NewFloat64Flag(fl *cli.Float64Flag) *Float64Flag {
return &Float64Flag{Float64Flag: fl, set: nil}
}