19 Commits

Author SHA1 Message Date
S.Solodyagin 575a0cdf6e Merge remote-tracking branch 'upstream/master' 2025-07-02 20:54:46 +03:00
Alex Broad 38e5c6198e Update help example to use vars (#429) 2024-05-27 21:02:24 +10:00
s.solodyagin 6795fa089a rename 2024-04-03 20:59:37 +03:00
Keilin Olsen 6042c4b10e Add example of HelpProvider + README
Relocate detailed help docs to main README
2022-05-18 01:07:21 -07:00
Keilin Olsen 1db2ea27af Move old shell/main to subdirectory
Also update README reference to same
2022-05-18 01:07:21 -07:00
Alec Thomas 2ac3d43124 Make invalid value error messages more useful. 2019-04-01 10:07:10 +11:00
Alec Thomas 6408010083 Clean up disparity between Context and Kong.
Previously, there was a confusing mix of functionality shared between
the two wherein you would need to use the Kong type for printing errors,
etc. but it did not have access to the context in order to print
context-sensitive usage information. This has been fixed.

Additionally, there are now fuzzy correction suggestions for flags and
commands

Also added a server example which shows how Kong can be used for parsing
in interactive shells. Run with:

    $ go run ./_examples/server/*.go

Then interact with:

    $ ssh -p 6740 127.0.0.1
2018-06-27 09:11:11 +10:00
Alec Thomas 212ea2a356 Add path, existingfile and existingdir types.
- Document custom types.
- Add docker example.
2018-06-21 16:19:08 +10:00
Alec Thomas cdcdf49f67 Display usage information on error. 2018-06-21 10:08:01 +10:00
Alec Thomas d9c0dd25b1 Compact help should display full command. 2018-06-21 00:04:35 +10:00
Alec Thomas 36506509f1 Better error reporting for short flags. 2018-06-20 22:45:34 +10:00
Alec Thomas 4edc701d63 Correctly check for required positionals. 2018-06-20 22:36:33 +10:00
Alec Thomas 653531d6bc Start making help slightly configurable. 2018-06-20 21:55:39 +10:00
Alec Thomas 73064a687f Add <command> to help when a sub-command is required. 2018-06-08 15:20:58 +10:00
Alec Thomas 96fa9c43d5 Improved documentation and help. 2018-06-05 11:36:51 +10:00
Alec Thomas fdc7230e22 Separate validation into a distinct step.
This allows help to be called even when the parse trace is invalid.
Without this, the command-line would have to be valid in order to use
help at all, which defeats the purpose.
2018-05-31 15:20:45 +10:00
Alec Thomas cf89213e1e Add hook support. 2018-05-27 18:01:10 +10:00
Gerald Kaszuba 3eb5e285ed Use "kong" as tag keys fixes #9 (#10) 2018-05-21 09:25:19 -04:00
Alec Thomas aa1bf9dcb5 Initial commit. 2018-04-10 16:51:06 +10:00