a05e4d0982
Remove App.Compiled
...
Closes #753
2022-11-08 19:13:31 -05:00
Naveen Gogineni
13cc7677ab
Add SkipFlagParsing to app
2022-11-02 09:23:54 -04:00
Naveen Gogineni
fb3a9cebb4
FIx: Allow ext flags to be opt-out by default rather than opt-in
2022-11-01 17:44:12 -04:00
dearchap
ae8d932413
Feature:(issue_269) Allow external package flag definitions ( #1540 )
...
* Feature:(issue_269) Add compatibility with external package flag definitions
* Add tests
* Add defer to remove global flag
* Use ptr to receiver for extFlag
* Add const for flag prefix to ignore
2022-10-28 09:17:13 -04:00
GuangyuFan
63cb372cce
Feature: (issue_1451) customized slice flag separator ( #1546 )
...
* feat: customized slice flag separator
* feat: modify go doc
* feat: update unit test
2022-10-27 17:32:00 +08:00
Naveen Gogineni
bb8ddda480
Cleanup: Fix app.go formatting
2022-10-14 17:26:56 -04:00
dearchap
33d08c39be
Update app.go
...
Co-authored-by: Dan Buch <dan@meatballhat.com>
2022-10-14 02:46:00 -04:00
Naveen Gogineni
00afca42c8
Add RunAsSubcommand to keep API unchanged
2022-10-11 16:35:54 -04:00
Naveen Gogineni
4a109bc0ce
Fix tests
2022-10-11 16:28:12 -04:00
Naveen Gogineni
a9d6b0d821
Changes from code review
2022-10-11 09:18:57 -04:00
Naveen Gogineni
59095aa762
make cmd.Run use varargs
2022-10-10 18:32:56 -04:00
Naveen Gogineni
2047c6630c
Cleanup
2022-10-09 16:49:30 -05:00
Naveen Gogineni
bc9ae33465
Merge latest and fix tests
2022-10-09 16:49:30 -05:00
Naveen Gogineni
d5947d7814
Initial cut
2022-10-09 16:49:30 -05:00
Naveen Gogineni
8227be1fe9
Add tests for command.VisibleFlagCategory
2022-10-07 11:06:34 -05:00
Wendell Sun
619958c3d2
Add ActionableFlag interface instead of modifying Flag interface directly
2022-09-16 00:07:14 +09:00
Wendell Sun
14366f7030
feat: flag action
2022-09-16 00:07:12 +09:00
Naveen Gogineni
8339b59554
Fix: Help name consistency among app/commands and subcommands
2022-09-11 10:21:56 -04:00
Ilia Choly
ca9df40abd
Add App.InvalidFlagAccessHandler ( #1446 )
...
* Add App.UnknownFlagHandler
* Rename App.UnknownFlagHandler to App.InvalidFlagAccessHandler
* Traverse parent contexts
2022-08-30 18:51:16 -04:00
Naveen Gogineni
57a8423422
Fix:(issue_1094) Dont execute Before/After handlers during shell completion
2022-08-17 21:19:34 -04:00
dearchap
e3ee4fb3ef
Merge pull request #1444 from Dokiys/fix/add_after_before_help_check
...
Fix After not run
2022-08-13 08:27:21 -04:00
Dokiy
1a1b9cd563
Fix HideHelp
2022-07-29 15:26:06 +08:00
Dokiy
a1c26d5491
Fix After not run
2022-07-29 11:05:32 +08:00
James Alavosus
77feee843d
Implement slightly wonky setup for checking against ...
...
subcommand names of a default command (should it be set)
2022-06-21 19:30:05 -04:00
James Alavosus
32dec1ddaa
feature: add DefaultCommand field to App
...
See issue #1307 for context.
2022-06-21 19:28:59 -04:00
9de0cd3c4a
Merge pull request #1396 from urfave/suggestion-pluggability
...
Introduce override hooks for suggestions
2022-05-22 11:14:46 -04:00
a78717f4f9
Merge remote-tracking branch 'origin/main' into michaeljs1990-add-flag-category-support
2022-05-19 07:40:56 -04:00
5bb9f453dc
Also make the did-you-mean template pluggable
2022-05-17 09:24:17 -04:00
68bd4903fd
Introduce override hooks for suggestions
...
Related to https://github.com/urfave/cli/pull/1390#discussion_r871398659
2022-05-17 09:02:17 -04:00
63b1a7deee
A few follow-up conflict resolutions
2022-05-07 14:43:15 -04:00
3d67b75be7
Merge branch 'suggestions' of ssh://github.com/saschagrunert/cli into saschagrunert-suggestions
2022-05-07 14:40:04 -04:00
16d5d5a3df
Some changes per feedback in #1368
2022-05-06 22:23:17 -04:00
156eaafb22
Rework flag categories a bit
...
with internal maps instead of slices and slightly less public API
surface area
2022-04-30 08:59:50 -04:00
a583a102fd
Merge remote-tracking branch 'origin/main' into michaeljs1990-add-flag-category-support
2022-04-28 20:29:09 -04:00
9ce946162f
Unshadow context
package
...
and consistently name `*cli.Context` vars and method receivers `cCtx`
2022-04-23 22:07:16 -04:00
e4580f0c50
Extend flag categorization to top-level (global) flags
2022-04-22 15:44:59 -04:00
75e4ee69e9
Porting remainder of #796
2022-04-22 15:01:40 -04:00
44958693a1
Merge branch 'add-flag-category-support' of ssh://github.com/michaeljs1990/cli into michaeljs1990-add-flag-category-support
2022-04-22 13:56:03 -04:00
7c50be3d7c
Switch branch references from master
to main
...
Connected to #1349
2022-04-21 16:14:27 -04:00
4b238b8ff0
Merge branch 'master' into suggestions
2022-04-19 16:45:20 -04:00
Naveen Gogineni
07e1fdf17d
Cleanup context.go
2021-04-05 07:57:41 -04:00
Wlad Gumenyuk
57d60cd570
Fix: typo
...
Corrected "eror" to "error" on line 331.
2020-12-27 18:30:11 +01:00
Alexander Frolov
e40b83a394
use Name as default to HelpName
2020-11-03 13:22:01 +03: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
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
Aloïs Micard
33744eb004
Harmonize BeforeError handling
2020-04-27 19:50:15 +02:00
Sebastian Malton
fed64f3ad7
add tests
2020-04-01 09:17:59 -04:00
Sebastian Malton
22b6dbaad3
Set App.ErrWriter in App.Setup()
...
- Defaults to os.Stderr
- Remove the App.errWriter() function since it is no longer needed
2020-03-31 10:43:36 -04:00
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
2020-03-24 20:32:39 -04:00