Commit Graph

9 Commits

Author SHA1 Message Date
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>
2020-03-03 13:06:34 +01:00
lynn [they]
233958cd00
revert testing change 2019-11-27 20:37:23 -08:00
lynn [they]
d733c54701
testing the tests 2019-11-27 20:36:07 -08:00
Roberto Hidalgo
9e7226ec28
use shellComplete instead of ignoreErrors`, clean up 2019-11-27 11:45:44 -05:00
Roberto Hidalgo
f3295e3cdb
Check for parsing errors within parse.go:parseIter
Add description to that function's docstring, and delete extraneous space
2019-11-27 11:42:57 -05:00
Robert Liebowitz
f5306b622f Ensure infinite loop cannot occur in parsing 2019-10-11 23:00:48 -04:00
Robert Liebowitz
df740f6562 Fix infinite loop flag parsing with short options 2019-10-11 23:00:45 -04:00
Robert Liebowitz
06e3d38d88 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.
2019-09-13 06:11:09 -04:00
Robert Liebowitz
03153b9cf8 Allow combining short flags globally 2019-08-05 06:38:23 -04:00