Skip to content

Commit 94d2e8f

Browse files
author
Sylvain Viart
committed
add more proposal to API_proposal.md
1 parent d0d339b commit 94d2e8f

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

Diff for: API_proposal.md

+22-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ It offer some API alternatives and allow to build external wrapper.
99

1010
## new cli API proposal for 2021
1111

12-
1312
* use verb for action
1413
* stop using `-h` `<msg>` for reading help
1514
* keep compatibily with old syntax trough a new verb: `compat`
@@ -18,8 +17,7 @@ It offer some API alternatives and allow to build external wrapper.
1817

1918
### new verb
2019

21-
replace `-h`
22-
20+
### replace `-h`
2321

2422
```
2523
Usage:
@@ -29,6 +27,7 @@ Usage:
2927
```
3028

3129
Example:
30+
3231
```
3332
docopts parse "$USAGE" : <option passed here>
3433
```
@@ -39,12 +38,31 @@ docopts parse "$USAGE" : <option passed here>
3938
docopts compat -h "$USAGE" : <option passed here>
4039
```
4140

41+
### generate usage completion
42+
4243
generate usage completion (as `kubect completion` done by [cobra](https://github.com/spf13/cobra/blob/master/shell_completions.md))
44+
4345
```
4446
docopts completion "$usage"
4547
```
4648

49+
### debug mode:
50+
51+
```
52+
Usage:
53+
docopts debug [--explain-parsed] USAGE : [<argv>...]
54+
docopts debug [--show-argument-match] USAGE : [<argv>...]
55+
```
56+
57+
### `docopt.sh` compatibile generator
58+
59+
```
60+
Usage:
61+
docopts generate USAGE
62+
docopts generate -f FILENAME
63+
```
64+
4765

4866
## Dropped JSON API proposal
4967

50-
old `API_proposal.md`
68+
old [API_proposal.md](https://github.com/docopt/docopts/blob/031ceb2f0700ac0e40303d72167b91586a6d60da/API_proposal.md)

0 commit comments

Comments
 (0)