Naveen Gogineni
1a31a6e2fc
Revert "Remove all flag interfaces"
...
This reverts commit 268cb973f8
.
2 years ago
Naveen Gogineni
8ef92d2a24
Remove un-needed func
2 years ago
Naveen Gogineni
4c637d8ac7
Fix:(issue_557) Change app help name
2 years ago
Wendell Sun
e2e14ec6ef
feat: flag action
2 years ago
Naveen Gogineni
8e3fa067e0
Fix: Help name consistency among app/commands and subcommands
2 years ago
Ilia Choly
e19a34c3c2
Rename App.UnknownFlagHandler to App.InvalidFlagAccessHandler
2 years ago
Ilia Choly
6331815fae
Add App.UnknownFlagHandler
2 years ago
Naveen Gogineni
42d8058ed9
Fix:(issue_1094) Dont execute Before/After handlers during shell completion
2 years ago
Dokiy
02eb392916
Fix After not run
2 years ago
Dokiy
67f592aadb
Fix HideHelp
2 years ago
Naveen Gogineni
268cb973f8
Remove all flag interfaces
2 years ago
James Alavosus
77feee843d
Implement slightly wonky setup for checking against ...
...
subcommand names of a default command (should it be set)
2 years ago
James Alavosus
32dec1ddaa
feature: add DefaultCommand field to App
...
See issue #1307 for context.
2 years ago
Dan Buch
9de0cd3c4a
Merge pull request #1396 from urfave/suggestion-pluggability
...
Introduce override hooks for suggestions
2 years ago
Dan Buch
a78717f4f9
Merge remote-tracking branch 'origin/main' into michaeljs1990-add-flag-category-support
2 years ago
Dan Buch
5bb9f453dc
Also make the did-you-mean template pluggable
2 years ago
Dan Buch
68bd4903fd
Introduce override hooks for suggestions
...
Related to https://github.com/urfave/cli/pull/1390#discussion_r871398659
2 years ago
Dan Buch
63b1a7deee
A few follow-up conflict resolutions
2 years ago
Dan Buch
3d67b75be7
Merge branch 'suggestions' of ssh://github.com/saschagrunert/cli into saschagrunert-suggestions
2 years ago
Dan Buch
16d5d5a3df
Some changes per feedback in #1368
2 years ago
Dan Buch
156eaafb22
Rework flag categories a bit
...
with internal maps instead of slices and slightly less public API
surface area
2 years ago
Dan Buch
a583a102fd
Merge remote-tracking branch 'origin/main' into michaeljs1990-add-flag-category-support
2 years ago
Dan Buch
9ce946162f
Unshadow `context` package
...
and consistently name `*cli.Context` vars and method receivers `cCtx`
2 years ago
Dan Buch
e4580f0c50
Extend flag categorization to top-level (global) flags
2 years ago
Dan Buch
75e4ee69e9
Porting remainder of #796
2 years ago
Dan Buch
44958693a1
Merge branch 'add-flag-category-support' of ssh://github.com/michaeljs1990/cli into michaeljs1990-add-flag-category-support
2 years ago
Dan Buch
7c50be3d7c
Switch branch references from `master` to `main`
...
Connected to #1349
2 years ago
Dan Buch
4b238b8ff0
Merge branch 'master' into suggestions
2 years ago
Naveen Gogineni
07e1fdf17d
Cleanup context.go
3 years ago
Wlad Gumenyuk
57d60cd570
Fix: typo
...
Corrected "eror" to "error" on line 331.
3 years ago
Alexander Frolov
e40b83a394
use Name as default to HelpName
4 years ago
Robert Liebowitz
30bb6982f2
Merge pull request #1191 from stellirin/master
...
feature: Add a App.Reader that defaults to os.Stdin
4 years ago
Charles Kenney
e5407cccf7
fix grammatical error
4 years ago
Adam Farden
342ce5d654
feature: Add a App.Reader that defaults to os.Stdin
...
Closes : #1190
4 years ago
Aloïs Micard
33744eb004
Harmonize BeforeError handling
4 years ago
Sebastian Malton
fed64f3ad7
add tests
4 years ago
Sebastian Malton
22b6dbaad3
Set App.ErrWriter in App.Setup()
...
- Defaults to os.Stderr
- Remove the App.errWriter() function since it is no longer needed
4 years ago
Robert Liebowitz
959cf9de8a
Update docs and tests around cli.Exit
...
Some of the docs were lacking or incomplete concerning how to properly
use cli.Exit, cli.HandleExitCoder, and the ExitErrHandler field on cli.App.
This change aims to clarify the usage of those pieces.
I also noticed that we have two identical functions now: cli.Exit and
cli.NewExitError. Since the latter seems to be more recent and less well
documented, I went ahead and marked it as deprecated so that we can keep
our public interface small.
Also added a missing test case for behavior that's been around a while
but was not documented or tested.
Related: #1089
4 years ago
Akihiro Suda
75e7c526bd
Add HideHelpCommand
...
While `HideHelp` hides both `help` command and `--help` flag, `HideHelpCommand`
only hides `help` command and leave `--help` flag as-is.
The behavior of `HideHelp` is untouched in this commit.
Fix #523
Replace #636
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
4 years ago
Sascha Grunert
002bde2233
Add suggestions support
...
The new option `app.Suggest` enables command and flag suggestions via
the jaro-winkler distance algorithm. Flags are scoped to their
appropriate commands whereas command suggestions are scoped to the
current command level.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
4 years ago
Dmitry Kutakov
5998e27dd7
remove unused code
4 years ago
lynn [they]
106103ee7b
Update app.go
4 years ago
Marwan Sulaiman
7daa2d133e
RunWithContext -> RunContext
5 years ago
Marwan Sulaiman
322fc3bed1
add RunWithContext + remove signal cancellation
5 years ago
Ajitem Sahasrabuddhe
286ffd2ccd
Merge branch 'master' into inconsistent-version-behaviour-v2
5 years ago
Ajitem Sahasrabuddhe
864c8349d5
Hide version info if user has not defined version
5 years ago
Roberto Hidalgo
f3295e3cdb
Check for parsing errors within parse.go:parseIter
...
Add description to that function's docstring, and delete extraneous space
5 years ago
Ajitem Sahasrabuddhe
3bd997859c
make categories private
5 years ago
Robert Liebowitz
7d46b6d7f1
Avoid panic for missing flag value
...
Currently, in cases where a flag value is required but not passed and
short-option handling is enabled, a panic will occur due to a nil
pointer dereference. This prevents that situation from occurring,
instead propagating the appropriate error.
5 years ago
Ajitem Sahasrabuddhe
a9d5b68df5
Merge branch 'master' into v2-master-merge
5 years ago