Skip to content

Commit 83c7a42

Browse files
committed
doc: release notes - added extended flag notation
1 parent d92ed0a commit 83c7a42

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed

docs/src/release_notes/v1.x.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,23 @@ Created [carapace-aws] to provide enriched completion for [aws-cli].
1010

1111
![](./v1.x/carapace-aws.png)
1212

13+
## Spec
14+
15+
Added extended flag notation for less common use cases.
16+
17+
- `nargs` amount of arguments consumed
18+
19+
```yaml
20+
name: command
21+
commands:
22+
- name: extended
23+
flags:
24+
--nargs-two=: {description: consumes two arguments, nargs: 2}
25+
--nargs-any=: {description: consumes multiple arguments, nargs: -1}
26+
```
27+
28+
![](./v1.x/extended.cast)
29+
30+
1331
[aws-cli]:https://github.com/aws/aws-cli
1432
[carapace-aws]:https://github.com/carapace-sh/carapace-aws
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{"version":3,"term":{"cols":108,"rows":24,"type":"tmux-256color","version":"tmux 3.5a"},"timestamp":1764113018,"env":{"SHELL":"elvish"}}
2+
[0.082551, "o", "\u001b[?7h\u001b[7m⏎\u001b[m \r \r\u001b[?7l\u001b[?2004h"]
3+
[0.000065, "o", "\u001b[?25l\r???> ???> \r\u001b[5C\u001b[?25h"]
4+
[0.000372, "o", "\u001b[?25l\r\u001b[5C\u001b[K\r\u001b[5C\u001b[?25h"]
5+
[0.015306, "o", "\u001b[?25l\r\r\u001b[5C\u001b[?25h\u001b[?25l\r\r\u001b[5C\u001b[?25h"]
6+
[0.00015, "o", "\u001b[?25l\r\u001b[K\r\n\u001b[0;1;36m~\u001b[0;m \r\n\u001b[0;1;37mesh\u001b[0;m \u001b[0;1;32m❯\u001b[0;m \r\u001b[6C\u001b[?25h"]
7+
[0.000315, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
8+
[0.000056, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
9+
[0.000133, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
10+
[0.15379, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[6C\u001b[0;31mc\u001b[0;m\r\u001b[7C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[7C\u001b[?25h"]
11+
[0.006231, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[7C\u001b[?25h"]
12+
[0.000053, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[7C\u001b[?25h"]
13+
[0.042474, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[7C\u001b[0;31mo\u001b[0;m\r\u001b[8C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[8C\u001b[?25h"]
14+
[0.130044, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[8C\u001b[0;31mm\u001b[0;m\r\u001b[9C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[9C\u001b[?25h"]
15+
[0.167205, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[6C\u001b[K\u001b[0;32mcomm\u001b[0;m\r\u001b[10C\u001b[?25h"]
16+
[0.000007, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[10C\u001b[?25h"]
17+
[0.121091, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[6C\u001b[K\u001b[0;31mcomma\u001b[0;m\r\u001b[11C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[11C\u001b[?25h"]
18+
[0.163719, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[11C\u001b[0;31mn\u001b[0;m\r\u001b[12C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[12C\u001b[?25h"]
19+
[0.11397, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[12C\u001b[0;31md\u001b[0;m\r\u001b[13C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[13C\u001b[?25h"]
20+
[0.096613, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[13C \r\u001b[14C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[14C\u001b[?25h"]
21+
[0.333592, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[14C\u001b[0;4ma \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7ma \u001b[0;m exclusiveflags nonposix \r\nal extended parsing \r\naliases flags persistentflags\r\ncompletion \u001b[0;34mgroup \u001b[0;m subcommand \r\ndescription\u001b[0;2m (with description)\u001b[0;m name usage \u001b[5A\r\u001b[22C\u001b[?25h"]
22+
[0.086331, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[15C\u001b[K\u001b[0;4mliases \r\n\u001b[22C\u001b[0;me\r\n\u001b[1C\u001b[K\u001b[0;7mliases \u001b[0;m exclusiveflags persistentflags\r\n\u001b[Kcompletion extended usage \r\n\u001b[Kdescription\u001b[0;2m (with description)\u001b[0;m name \r\n\u001b[J\u001b[A\u001b[3A\r\u001b[23C\u001b[?25h"]
23+
[0.000173, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\r\n\r\n\u001b[3A\r\u001b[23C\u001b[?25h"]
24+
[0.000502, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\r\n\r\n\u001b[3A\r\u001b[23C\u001b[?25h"]
25+
[0.000076, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\r\n\r\n\u001b[3A\r\u001b[23C\u001b[?25h"]
26+
[0.194686, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[14C\u001b[K\u001b[0;4mexclusiveflags \r\n\u001b[23C\u001b[0;mx\r\n\u001b[K\u001b[0;7mexclusiveflags\u001b[0;m extended\r\n\u001b[J\u001b[A\u001b[1A\r\u001b[24C\u001b[?25h\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\u001b[1A\r\u001b[24C\u001b[?25h"]
27+
[0.168579, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[16C\u001b[K\u001b[0;4mtended \r\n\u001b[24C\u001b[0;mt\r\n\u001b[2C\u001b[K\u001b[0;7mtended\u001b[0;m\u001b[1A\r\u001b[25C\u001b[?25h\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\u001b[1A\r\u001b[25C\u001b[?25h"]
28+
[0.420168, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[14C\u001b[Kextended \r\n\u001b[J\u001b[A\r\u001b[23C\u001b[?25h"]
29+
[0.415198, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[23Cp\r\u001b[24C\u001b[?25h"]
30+
[0.610661, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[23C\u001b[K\u001b[0;4mpAny \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7mpAny\u001b[0;m positionalAny\u001b[1A\r\u001b[22C\u001b[?25h"]
31+
[0.730823, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[23C\u001b[Kp\r\n\u001b[J\u001b[A\r\u001b[24C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[24C\u001b[?25h"]
32+
[0.363861, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[23C\u001b[K\r\u001b[23C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[23C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[23C\u001b[?25h"]
33+
[0.000536, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[23C\u001b[?25h"]
34+
[0.000253, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[23C\u001b[?25h"]
35+
[0.098967, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[23C-\r\u001b[24C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[24C\u001b[?25h"]
36+
[0.401515, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[24C-nargs-\r\u001b[31C\u001b[?25h"]
37+
[0.496253, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[23C\u001b[K\u001b[0;4m--nargs-any \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7;35m--nargs-any\u001b[0;2;7m (consumes multiple arguments)\u001b[0;m \u001b[0;35m--nargs-two\u001b[0;2m (consumes two arguments)\u001b[0;m\u001b[1A\r\u001b[22C\u001b[?25h"]
38+
[0.659962, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[23C\u001b[K--nargs-any \r\n\u001b[J\u001b[A\r\u001b[35C\u001b[?25h"]
39+
[0.000102, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[35C\u001b[?25h"]
40+
[0.00003, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[35C\u001b[?25h"]
41+
[0.375696, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[35C\u001b[0;4mone \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7mone\u001b[0;m three two\u001b[1A\r\u001b[22C\u001b[?25h"]
42+
[0.797718, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[35C\u001b[Kone \r\n\u001b[J\u001b[A\r\u001b[39C\u001b[?25h"]
43+
[0.241822, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[39C\u001b[0;4mone \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7mone\u001b[0;m three two\u001b[1A\r\u001b[22C\u001b[?25h"]
44+
[0.071254, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[39C\u001b[K\u001b[0;4mthree \r\n\r\n\u001b[0;m\u001b[Kone \u001b[0;7mthree\u001b[0;m two\u001b[1A\r\u001b[22C\u001b[?25h\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\u001b[1A\r\u001b[22C\u001b[?25h"]
45+
[0.483304, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[40C\u001b[K\u001b[0;4mwo \r\n\r\n\u001b[5C\u001b[0;m\u001b[Kthree \u001b[0;7mtwo\u001b[0;m\u001b[1A\r\u001b[22C\u001b[?25h"]
46+
[0.208474, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[39C\u001b[Ktwo \r\n\u001b[J\u001b[A\r\u001b[43C\u001b[?25h"]
47+
[0.000138, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[43C\u001b[?25h"]
48+
[0.251635, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[43C\u001b[0;4mone \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7mone\u001b[0;m three two\u001b[1A\r\u001b[22C\u001b[?25h"]
49+
[0.111746, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[43C\u001b[K\u001b[0;4mthree \r\n\r\n\u001b[0;m\u001b[Kone \u001b[0;7mthree\u001b[0;m two\u001b[1A\r\u001b[22C\u001b[?25h\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\u001b[1A\r\u001b[22C\u001b[?25h"]
50+
[0.422442, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[43C\u001b[Kthree \r\n\u001b[J\u001b[A\r\u001b[49C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[49C\u001b[?25h"]
51+
[0.309068, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[49C\u001b[0;4mone \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7mone\u001b[0;m three two\u001b[1A\r\u001b[22C\u001b[?25h"]
52+
[0.545448, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[49C\u001b[K\r\n\u001b[J\u001b[A\r\u001b[49C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[49C\u001b[?25h"]
53+
[0.308075, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[49C-\r\u001b[50C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[50C\u001b[?25h"]
54+
[0.245636, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[50C-nargs-two \r\u001b[61C\u001b[?25h"]
55+
[0.724719, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[61C\u001b[0;4mone \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7mone\u001b[0;m three two\u001b[1A\r\u001b[22C\u001b[?25h"]
56+
[0.847028, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[61C\u001b[Kone \r\n\u001b[J\u001b[A\r\u001b[65C\u001b[?25h"]
57+
[0.222524, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[65C\u001b[0;4mone \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7mone\u001b[0;m three two\u001b[1A\r\u001b[22C\u001b[?25h"]
58+
[0.306819, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[65C\u001b[K\u001b[0;4mthree \r\n\r\n\u001b[0;m\u001b[Kone \u001b[0;7mthree\u001b[0;m two\u001b[1A\r\u001b[22C\u001b[?25h\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\u001b[1A\r\u001b[22C\u001b[?25h"]
59+
[0.318216, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[66C\u001b[K\u001b[0;4mwo \r\n\r\n\u001b[5C\u001b[0;m\u001b[Kthree \u001b[0;7mtwo\u001b[0;m\u001b[1A\r\u001b[22C\u001b[?25h"]
60+
[0.000398, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\u001b[1A\r\u001b[22C\u001b[?25h"]
61+
[0.000259, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\u001b[1A\r\u001b[22C\u001b[?25h"]
62+
[0.231434, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[65C\u001b[Ktwo \r\n\u001b[J\u001b[A\r\u001b[69C\u001b[?25h"]
63+
[0.563184, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[69Cp\r\u001b[70C\u001b[?25h"]
64+
[0.567436, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[69C\u001b[K\u001b[0;4mpAny \r\n\u001b[0;1;37;45m COMPLETING argument \u001b[0;m \r\n\u001b[0;7mpAny\u001b[0;m positionalAny\u001b[1A\r\u001b[22C\u001b[?25h"]
65+
[0.856715, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[70C\u001b[K\u001b[0;4mositionalAny \r\n\r\n\u001b[0;m\u001b[KpAny \u001b[0;7mpositionalAny\u001b[0;m\u001b[1A\r\u001b[22C\u001b[?25h\u001b[?25l\u001b[3A\r\r\n\r\n\r\n\r\n\u001b[1A\r\u001b[22C\u001b[?25h"]
66+
[0.469541, "o", "\u001b[?25l\u001b[3A\r\r\n\r\n\u001b[69C\u001b[KpositionalAny \r\n\u001b[J\u001b[A\r\u001b[83C\u001b[?25h"]
67+
[2.122064, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[6C\u001b[K\r\u001b[6C\u001b[?25h"]
68+
[0.000062, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
69+
[0.012754, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
70+
[0.000444, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
71+
[0.000102, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
72+
[0.000084, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
73+
[0.000039, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
74+
[0.000377, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[6C\u001b[?25h"]
75+
[0.479036, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[6C\u001b[0;31me\u001b[0;m\r\u001b[7C\u001b[?25h"]
76+
[0.173392, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[7C\u001b[0;31mx\u001b[0;m\r\u001b[8C\u001b[?25h\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[8C\u001b[?25h"]
77+
[0.170918, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[8C\u001b[0;31mi\u001b[0;m\r\u001b[9C\u001b[?25h"]
78+
[0.00016, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[9C\u001b[?25h"]
79+
[0.03955, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\u001b[6C\u001b[K\u001b[0;32mexit\u001b[0;m\r\u001b[10C\u001b[?25h"]
80+
[0.000076, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\u001b[10C\u001b[?25h"]
81+
[0.161012, "o", "\u001b[?25l\u001b[2A\r\r\n\r\n\r\n\r\u001b[?25h\u001b[?7h\u001b[?2004l\r"]
82+
[0.061666, "x", "0"]

0 commit comments

Comments
 (0)