Commit Graph

2226 Commits

Author SHA1 Message Date
Joe Gregorio
d56c85cef5 Add test for the else path. 2021-01-28 14:35:55 -05:00
Joe Gregorio
b8debb6845 Fix Context.Value.
Before this change the added test would crash on a nil
pointer dereference because the original code would
only look in the local fileSet and not across all
the fileSets.
2021-01-28 14:35:55 -05:00
Madhur batra
e73d6e133d Merge branch 'master' of https://github.com/urfave/cli 2021-01-28 10:47:45 +05:30
Nobuhiro MIKI
ed2ee4bc4a make the man page section selectable
Signed-off-by: Nobuhiro MIKI <nob@bobuhiro11.net>
2021-01-28 09:39:26 +09:00
Zach Wasserman
797d5a8d46
Link directly to pkg.go.dev 2021-01-27 16:10:42 -08:00
Andrew Nicoll
06e7bdec34 add test for nil 2021-01-27 18:41:52 +00:00
lynn (they)
c3ebeaee7b
Update stale.yml 2021-01-27 10:37:40 -08:00
Zach Wasserman
a7dc35be5b
Link to godoc for v2
This is consistent with the default tag for the repository.
2021-01-27 09:29:24 -08:00
lynn (they)
44ec98527e
Merge pull request #1225 from Coderlane/command_reader
fix: Propagate App.Reader to subcommands
2021-01-25 10:08:46 -08:00
lynn (they)
8fb96e61af
Merge pull request #1226 from Coderlane/doc_command
fix: Fixup runnable example input arguments
2021-01-25 10:05:16 -08:00
Travis Lane
1f380b0733
fix: Fixup runnable example input arguments
This command has no name, so drop the `test-cmd` in `args`.
2021-01-24 20:54:48 -05:00
Travis Lane
17032bc33c
fix: Propagate App.Reader to subcommands
This change copies the `Reader` set in `App` to the new `App` created for
subcommands. I've also added a basic test to demonstrate the issue.
2021-01-24 19:49:13 -05:00
Madhur batra
fc1d3eb8da Merge branch 'master' of https://github.com/urfave/cli 2021-01-06 17:21:48 +05:30
lynn (they)
2e9dc401bb
Merge pull request #1216 from wgumenyuk/patch-1
Fix: typo
2021-01-04 13:58:01 -08:00
Wlad Gumenyuk
57d60cd570
Fix: typo
Corrected "eror" to "error" on line 331.
2020-12-27 18:30:11 +01:00
Robert Liebowitz
83394fca6f
Merge pull request #1207 from bbkane/patch-1
Add link to pkg.go.dev docs in manual.md
2020-12-13 11:11:49 -05:00
Andrew Nicoll
ebe2c0ea70 add for int64 2020-12-09 12:27:56 +00:00
Andrew Nicoll
02f3866db2 add nother test 2020-12-09 12:26:08 +00:00
Andrew Nicoll
55992853bf add flag tests 2020-12-09 11:59:50 +00:00
Andrew Nicoll
a27ce0e881 unable to see whats happening here with lack of debug but this seems to resolve the failing doc test 2020-12-09 11:48:33 +00:00
Andrew Nicoll
2144cc5ad4 fix for parent context not setting child flags 2020-12-09 11:17:21 +00:00
Ajitem Sahasrabuddhe
d5833134fc
Merge pull request #1212 from jcgregorio/fix-cli-yml
Fix workflows/cli.yml.
2020-12-07 09:44:19 +05:30
Joe Gregorio
d5643c884a Fix workflows/cli.yml.
The ::set-env and ::add-path commands no longer work and need to
to be replaced. See:

    https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
2020-12-06 10:00:16 -05:00
Madhur batra
ea14b62ecc Issue #1066: Display (accepts multiple inputs) for SliceFlags in the
help description.
2020-12-01 14:14:15 +05:00
Benjamin Kane
7c756af2b4
Add link to pkg.go.dev docs 2020-11-27 21:30:44 -08:00
Robert Liebowitz
fe989e1a7a
Merge pull request #1202 from fxrlv/patch-1
use Name as default to HelpName
2020-11-25 21:27:18 -05:00
Mostyn Bramley-Moore
cdc1f6e07c fixup! Report the source of a value when we cannot parse it
move bool to the end of the return arguments

remove "from " prefix in the source/fromWhere description

remove TODO notes from functions that don't currently perform error checking
2020-11-07 14:05:39 +01:00
Mostyn Bramley-Moore
500d6b04e6 Report the source of a value when we cannot parse it
If you allow a flag to be set from environment variables or files and
a parse error occurs from one of them, it is very useful for the error
message to mention where the value came from.

Without this, it can be difficult to notice an error caused by an
unexpected environment variable being set.

Implements #1167.
2020-11-03 23:57:00 +01:00
Ajitem Sahasrabuddhe
ec731febcc
Merge pull request #1200 from urfave/add-support-for-go-115
Add Support for Go 1.15
2020-11-03 16:25:03 +05:30
Alexander Frolov
e40b83a394
use Name as default to HelpName 2020-11-03 13:22:01 +03:00
Ajitem Sahasrabuddhe
09ac54c2f9
Merge pull request #1175 from imle/imle/add-better-multi-line-description-formatting
Added template functions for multi-line Description formatting.
2020-11-01 14:29:08 +05:30
Robert Liebowitz
a99b68f006
Merge pull request #1194 from igorrius/extend-altscr
#1193 Expose constructor of MapInputSource type
2020-10-31 11:58:16 -04:00
Robert Liebowitz
5fed9f16be
Merge pull request #1188 from theoretick/bump-yaml-to-v2.2.3
Bump gopkg.in/yaml.v2 to v2.2.3
2020-10-31 11:57:40 -04:00
Robert Liebowitz
d89733ea65
Merge pull request #1183 from knqyf263/feat/subcommand_help_and_exit
feat(help): add ShowSubcommandHelpAndExit
2020-10-31 11:57:12 -04:00
Robert Liebowitz
3629eb8550
Merge pull request #1139 from kirinnee/master
Added manual and script for PowerShell autocomplete
2020-10-31 11:56:33 -04:00
Robert Liebowitz
3be15f7525
Merge pull request #1198 from ErinCall/paths-take-files
Support PathFlag.TakesFile in fish completion
2020-10-31 11:54:41 -04:00
Ajitem Sahasrabuddhe
06e570991c Reduce desiredMinBinarySize
Updating the Go version has also optimized the binary size, so the desiredMinBinarySize is being updated to be 1.9
2020-10-31 00:14:08 +05:30
Ajitem Sahasrabuddhe
2a5a092888 Add Support for Go 1.15
And also drop support for Go 1.12 in line with Go's Release Policy https://golang.org/doc/devel/release.html#policy
2020-10-31 00:08:57 +05:30
Erin Call
5c8d915be7
Revert "Refactor fishAddFileFlag for better flexibility [#1156]"
This reverts commit fcce511478.
2020-10-22 14:22:01 -07:00
Erin Call
c3263d495e
Merge branch 'master' into paths-take-files 2020-10-22 08:57:35 -07:00
Igor Artasevych
7f005015c8
Update altsrc/map_input_source.go
Co-authored-by: Robert Liebowitz <rliebz@gmail.com>
2020-10-22 10:00:45 +03:00
lynn (they)
e062e733d8
Merge pull request #1173 from zemzale/fix-documentation
Fix v1 aliases syntax in v2 docs
2020-10-21 20:18:45 -07:00
Robert Liebowitz
30bb6982f2
Merge pull request #1191 from stellirin/master
feature: Add a App.Reader that defaults to os.Stdin
2020-10-21 21:49:32 -04:00
Erin Call
fcce511478
Refactor fishAddFileFlag for better flexibility [#1156]
Performing reflection on the given flag ensures that fishAddFileFlag
will behave correctly if any flag types get a TakesFile field in the
future.
2020-10-13 13:00:19 -07:00
Erin Call
0d11bd55f5
Merge remote-tracking branch 'origin/master' into paths-take-files 2020-10-13 11:33:31 -07:00
Igor Artasevych
27a8625ccd #1193 Expose constructor of MapInputSource type 2020-10-08 18:38:59 +03:00
Sascha Grunert
cd82784a53
Merge pull request #1192 from Charliekenney23/fix-typo
fix grammatical error
2020-10-08 09:19:23 +02:00
Charles Kenney
e5407cccf7
fix grammatical error 2020-10-06 22:24:56 -04:00
Adam Farden
342ce5d654 feature: Add a App.Reader that defaults to os.Stdin
Closes: #1190
2020-10-02 12:39:44 +02:00
Sascha Grunert
f53989457f
Merge pull request #1178 from alexcb/master
bugfix: don't overwrite existing stringslice refence
2020-09-21 23:40:16 +02:00