Jesse Szwedko
3ba36a3127
Merge pull request #568 from kklipsch/master
...
Fix for #556 broke the api for users who were using the ActionFunc
8 years ago
Kasey Klipsch
8fa549846e
#556 broke the api for users who were using the ActionFunc
8 years ago
Jesse Szwedko
b6061c464d
Merge pull request #559 from joshuarubin/completion_fix
...
make shell autocomplete more robust
8 years ago
Jesse Szwedko
7fbcf2396a
Update date of 1.19.0 release in CHANGELOG
...
[ci skip]
8 years ago
Jesse Szwedko
a8fc36b690
Update CHANGELOG
8 years ago
Jesse Szwedko
6a87e37dff
Merge pull request #564 from urfave/altsrc-errorable-flag
...
Make ApplyWithError a public method on errorableFlag
8 years ago
Jesse Szwedko
d71794de19
Make ApplyWithError a public method on errorableFlag
...
Add to altsrc flags. Otherwise, flagSet() was bypassing altsrc's attempt
at shadowing.
8 years ago
Jesse Szwedko
8500a4cefd
Merge pull request #567 from drekar/errorable-flag-panic-fix
...
errorableFlag: scope result of type assertion.
8 years ago
Joshua Rubin
2da42640ad
Merge remote-tracking branch 'origin/master' into completion_fix
8 years ago
drekar
4661a59b20
errorableFlag: scope result of type assertion.
8 years ago
Joshua Rubin
3272baf434
add a test for shell completion using incomplete flags
8 years ago
Joshua Rubin
8dd1962f7b
change "complete" to "shellComplete"
8 years ago
Jesse Szwedko
b4f4786f37
Merge pull request #529 from urfave/prepare-v1.19.0
...
Prepare v1.19.0 release
8 years ago
Jesse Szwedko
dcdea39be2
Add additional entries to changelog for v.19.0 release
8 years ago
Jesse Szwedko
fa7ccb1447
Update changelog
8 years ago
Jesse Szwedko
4c2360f975
Prepare CHANGELOG for v1.19.0
8 years ago
Jesse Szwedko
de551c4450
Backport removal of deprecation warnings
...
#508
8 years ago
Jesse Szwedko
31b79c9a33
Merge pull request #530 from urfave/consider-empty-env-vars
...
Consider empty environment variables as set
8 years ago
Jesse Szwedko
b4a64dc08d
Add windows implementation of Clearenv for tests
...
Apparently `Clearenv` in Windows just sets the variables to ""
8 years ago
Jesse Szwedko
e367fafa3d
Return an error when parsing environment variables for values fails
...
Currently cli silently (aside from IntSlice and Int64Slice which oddly
printed directly to the error stream) ignores failures that occur when
parsing environment variables for their value for flags that define
environment variables. Instead, we should propogate up the error to the
user.
This is accomplished in a backwards compatible manner by adding a new,
internal, interface which defines an applyWithError function that all
flags here define. In v2, when we can modify the interface, we can drop
this secondary interface and modify `Apply` to return an error.
8 years ago
Jesse Szwedko
a00c3f5872
Consider empty environment variables as set
...
When assigning values to flags (also when interogatting via
`context.(Global)IsSet`.
For boolean flags, consider empty as `false`.
Using `syscall.Getenv` rather than `os.LookupEnv` in order to support
older Golang versions.
8 years ago
Jesse Szwedko
7a5dacbc41
Merge pull request #560 from mh-cbon/master
...
Close #558 : detect FormattedError and print their stack trace
8 years ago
mh-cbon
b0a8f25773
558: handle multi formatter errors
8 years ago
Jesse Szwedko
af372e8e2a
Merge branch 'master' into master
8 years ago
Jesse Szwedko
88ae7af8d4
Merge pull request #563 from urfave/print-help-if-no-action
...
If no action is specified on the command or app, print the help documentation
8 years ago
Jesse Szwedko
0113f56d10
If no action is specified on the command or app, print the help documentation
...
Rather than panic'ing or displaying an opaque error message about the
signature which is more confusing to the end user.
Fixes #562
8 years ago
mh-cbon
79591889a9
Close #558 : detect FormattedError and print their stack trace
8 years ago
Joshua Rubin
ea3df26e64
make shell autocomplete more robust
8 years ago
Dan Buch
d86a009f5e
Merge pull request #556 from urfave/use-assertions-over-reflection
...
Use type assertions rather than reflection to determine how to call the `Action`
8 years ago
Jesse Szwedko
b377b5d9e9
Use type assertions rather than reflection to determine how to call the `Action`
...
This has some benefits, but results in possibly less informative error
messaging; however, given that there are only two accepted types,
I think the error messaging is sufficient.
8 years ago
Jesse Szwedko
3eb41f1bb1
Merge pull request #547 from urfave/default-writer
...
Default app.Writer to os.Stdout
8 years ago
Jesse Szwedko
61db37e7ae
Merge branch 'master' into default-writer
8 years ago
Jesse Szwedko
f614c177b7
Merge pull request #543 from wking/app-description
...
app: Add App.Description
8 years ago
Jesse Szwedko
b803494208
Merge pull request #542 from mhmxs/patch-1
...
Display error instead of just say command is incorrect
8 years ago
Richard Kovacs
668cf38bbe
Merge branch 'master' into patch-1
8 years ago
W. Trevor King
3c2bce5807
help: Cleanup AppHelpTemplate trailing whitespace
...
Most of the changes here remove trailing whitespace, but I also add
code to select "AUTHOR" or "AUTHORS" as appropriate instead of the
previous "AUTHOR(S)". The template for listing with an entry per line
is:
{{range $index, $entry := pipeline}}{{if $index}}
{{end}}{{$entry}}{{end}}
That range syntax is discussed in [1].
Also add a unit test, which tests both these whitespace changes and
also the earlier App.Description addition.
[1]: https://golang.org/pkg/text/template/#hdr-Variables
8 years ago
W. Trevor King
0c143a2a26
app: Fix trailing space for Author.String()
...
This code initially landed with lots of space:
'{name} <{email}> '
or:
'{name} '
in 3d718330
(app, help: add support for multiple authors, 2015-01-31).
The doubled space between the name and email was removed in c6592bb4
(app, help: add backwards compatibility for Authors, 2015-02-21), but
a trailing space remained in both the email and email-less cases.
This commit removes that trailing space.
8 years ago
Jesse Szwedko
6f2647a880
Merge pull request #544 from runcom/sort-flags
...
flags: sort flags
8 years ago
Jesse Szwedko
64fcd51526
Merge branch 'master' into sort-flags
8 years ago
Jesse Szwedko
3f4989051e
Merge pull request #550 from runcom/test-go-1-7
...
.travis.yml: add go 1.7.x
8 years ago
Antonio Murdaca
d913b71c72
.travis.yml: add go 1.7.x
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
8 years ago
Antonio Murdaca
c516bce8f1
flags: provide a type to sort flags
...
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
8 years ago
Richard Kovacs
4cc2bad36e
Display error instead of just say command is incorrect
8 years ago
Jesse Szwedko
508a23430b
Default app.Writer to os.Stdout
...
As NewApp() does.
Fixes #545
8 years ago
W. Trevor King
c4a46a7df2
app: Add App.Description
...
So you can describe what the application is for without requiring
users to drill down into a particular command.
8 years ago
Jesse Szwedko
55f715e28c
Merge pull request #541 from dotCipher/patch-1
...
Typo in comments
8 years ago
Cody Moore
6c2c80959b
Typo in comments
...
Typo changing `implents` to `implements`
8 years ago
Jesse Szwedko
d53eb99165
Merge pull request #531 from keloyang/SkipFlagParsing-SkipArgReorder-bugfix
...
bug fix when SkipFlagParsing is false and SkipArgReorder is true
8 years ago
Shukui Yang
5d108a4435
bug fix when SkipFlagParsing is false and SkipArgReorder is true
...
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
8 years ago
Jesse Szwedko
61f519fe5e
Merge pull request #528 from urfave/backport-no-arg-reordering
...
Backport no argument reordering as an option
8 years ago