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
2 years ago
Josh Soref
7732a512f9
Spelling ( #1543 )
...
* spelling: available
* spelling: explicitly
* spelling: feel
* spelling: github
* spelling: individual
* spelling: inputting
* spelling: occurring
* spelling: overriding
* spelling: propagated
* spelling: recursively
* spelling: reuse
* spelling: single
* spelling: value
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2 years ago
Naveen Gogineni
729a7c41ce
Fix:(issue_1206) Default value shouldnt depend on env variable or value set from cmdline
2 years ago
Naveen Gogineni
4a109bc0ce
Fix tests
2 years ago
Naveen Gogineni
a9d6b0d821
Changes from code review
2 years ago
Naveen Gogineni
d5947d7814
Initial cut
2 years ago
Naveen Gogineni
8227be1fe9
Add tests for command.VisibleFlagCategory
2 years ago
Naveen Gogineni
02613e50be
Fix tests
2 years ago
dearchap
fb23ff4aa2
Merge branch 'main' into issue_1500
2 years ago
Naveen Gogineni
6504da449b
Add test case
2 years ago
Naveen Gogineni
fe6f62b9b2
Fix:(issue_1500). Fix slice flag value duplication issue
2 years ago
dearchap
de83493182
Merge pull request #1499 from dearchap/issue_557
...
Fix help results inconsistency
2 years ago
Naveen Gogineni
e925d26b97
Fix:(issue_557) Make help output consistent between different invocations
2 years ago
Wendell Sun
47f6782a90
Add more test cases
2 years ago
Wendell Sun
602471bf21
Add more tests about flag-level action
2 years ago
Wendell Sun
14366f7030
feat: flag action
2 years ago
Naveen Gogineni
7b28ca54ea
Rename function
2 years ago
Naveen Gogineni
57a8423422
Fix:(issue_1094) Dont execute Before/After handlers during shell completion
2 years ago
dearchap
e3ee4fb3ef
Merge pull request #1444 from Dokiys/fix/add_after_before_help_check
...
Fix After not run
2 years ago
Dokiy
1a1b9cd563
Fix HideHelp
2 years ago
Dokiy
a1c26d5491
Fix After not run
2 years ago
James Alavosus
d8c93f867b
app_test.go: add tests for default command + flag
2 years ago
James Alavosus
1dfa9827f6
gofmt
2 years ago
James Alavosus
1b3da50f16
Add test cases for subcommands of default command
2 years ago
James Alavosus
32dec1ddaa
feature: add DefaultCommand field to App
...
See issue #1307 for context.
2 years ago
Dan Buch
4bca72cea1
Merge remote-tracking branch 'origin/main' into michaeljs1990-add-flag-category-support
2 years ago
Dan Buch
e66017d73a
Refinements to removal of zsh hack
2 years ago
Dan Buch
56837b07d3
Merge remote-tracking branch 'origin/main' into applying-pr1218
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
6538e95d65
Merge branch 'ally_fix_multi_val' of ssh://github.com/vipally/cli into vipally-ally_fix_multi_val
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
Ihor Urazov
1150c2e180
Properly detect Zsh shell
...
There is no need to define custom shell var, when Zsh can be detected by
checking SHELL env var.
2 years ago
William Wilson
e8d8173889
Make test case compatible with Go 1.17 ( #1299 )
...
* Make test case compatible with Go 1.17
* tweak test case to bring coverage back up
2 years ago
Ally Dale
ef9430e77e
fix #1238 : accept multi-value input on sclice flags
3 years ago
Jason Travis
1985ecfdc0
remove repeated comment
3 years ago
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.
3 years ago
Adam Farden
342ce5d654
feature: Add a App.Reader that defaults to os.Stdin
...
Closes : #1190
4 years ago
Sebastian Malton
fed64f3ad7
add tests
4 years ago
itchyny
aed5577db6
fix description of subcommand more consistent
4 years ago
lynn [they]
34b298bfe2
Merge branch 'master' into refactor-tests-drop-buffer-writer
4 years ago
Dmitry Kutakov
ef89298b56
refactor tests - drop mock writer
...
Use bytes.Buffer instead.
4 years ago
Dmitry Kutakov
94a1912e25
reduce stdout logs in tests
...
Keep the stdout clean if all tests are passed. It helps to debug a broken test, because only a failed test prints to output.
4 years ago
Ajitem Sahasrabuddhe
969535eec6
replace log.Print with t.Log
4 years ago
Ajitem Sahasrabuddhe
63d19b6c5c
remove comments
5 years ago
Ajitem Sahasrabuddhe
b6d04dbae4
replace t.Logf with log.Printf, replace t.Log with log.Print and add gopath to bin
5 years ago
Ajitem Sahasrabuddhe
cda3a4900e
Fix failing test
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