Skip to content

Commit 5e07ec7

Browse files
committed
doc: added groups
1 parent f923220 commit 5e07ec7

File tree

8 files changed

+6431
-3
lines changed

8 files changed

+6431
-3
lines changed

.docker/carapace.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ services:
1313
command: sh -c 'cp -r /carapace-bin /build && cd /build/ && goreleaser release --snapshot --clean --skip publish --parallelism 1'
1414
volumes:
1515
- '..:/carapace-bin:ro'
16-
16+
17+
docs:
18+
image: ghcr.io/carapace-sh/mdbook:latest
19+
command: mdbook serve --hostname 0.0.0.0 --dest-dir /tmp/book /docs
20+
volumes:
21+
- '../docs:/docs:ro'
22+
ports:
23+
- 3000:3000
24+
1725
bash:
1826
image: ghcr.io/carapace-sh/base
1927
volumes:

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- [Setup](./setup.md)
77
- [Environment](./setup/environment.md)
88
- [UserConfigDir](./setup/userConfigDir.md)
9+
- [Groups](./groups.md)
910
- [Completers](./completers.md)
1011
- [Style](./style.md)
1112
- [Bridges](./bridges.md)

docs/src/groups.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
> unreleased
2+
3+
# Groups
4+
5+
Completers are organized into **groups**.
6+
7+
- `android` termux completers
8+
- `bridge` bridged completers
9+
- `bsd` bsd-like completers
10+
- `common` common completers
11+
- `darwin` macos completers
12+
- `linux` linux completers
13+
- `unix` unix-like completers
14+
- `user` user specs
15+
- `system` system specs
16+
- `windows` windows completers
17+
18+
You can **list** available completers of a **group** with `carapace --list @{group}`.
19+
20+
![](./groups/group.cast)
21+
22+
> Binaries only contain **relevant groups** unless built with the [build tag](https://www.digitalocean.com/community/tutorials/customizing-go-binaries-with-build-tags) `force_all`.
23+
24+
## Priority
25+
26+
Multiple **groups** providing a completer for a command are ordered by **priority**.
27+
28+
- darwin
29+
1. `user`
30+
1. `system`
31+
1. `darwin`
32+
1. `bsd`
33+
1. `unix`
34+
1. `common`
35+
1. `bridge`
36+
37+
- linux
38+
1. `user`
39+
1. `system`
40+
1. `linux`
41+
1. `unix`
42+
1. `common`
43+
1. `bridge`
44+
45+
- termux
46+
1. `user`
47+
1. `system`
48+
1. `android`
49+
1. `linux`
50+
1. `unix`
51+
1. `common`
52+
1. `bridge`
53+
54+
- windows
55+
1. `user`
56+
1. `system`
57+
1. `windows`
58+
1. `common`
59+
1. `bridge`
60+
61+
62+
You can **list** available completers of a **command** with `carapace --list {command}`.
63+
64+
![](./groups/priority.cast)

docs/src/groups/group.cast

Lines changed: 3114 additions & 0 deletions
Large diffs are not rendered by default.

docs/src/groups/priority.cast

Lines changed: 108 additions & 0 deletions
Large diffs are not rendered by default.

docs/src/release_notes/v1.x.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,24 @@ commands:
2828
![](./v1.x/extended.cast)
2929
3030
31+
## Groups
32+
33+
Organized completers into [**groups**](../groups.md).
34+
35+
- `android` termux completers
36+
- `bridge` bridged completers
37+
- `bsd` bsd-like completers
38+
- `common` common completers
39+
- `darwin` macos completers
40+
- `linux` linux completers
41+
- `unix` unix-like completers
42+
- `user` user specs
43+
- `system` system specs
44+
- `windows` windows completers
45+
46+
![](./v1.x/group.cast)
47+
48+
49+
3150
[aws-cli]:https://github.com/aws/aws-cli
3251
[carapace-aws]:https://github.com/carapace-sh/carapace-aws

docs/src/release_notes/v1.x/group.cast

Lines changed: 3114 additions & 0 deletions
Large diffs are not rendered by default.

pkg/actions/tools/carapace/completer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ func ActionGroups(nameVariant string) carapace.Action {
9494

9595
descriptions := map[string]string{
9696
"android": "termux completers",
97-
"bridge": "bridged completions",
97+
"bridge": "bridged completers",
9898
"bsd": "bsd-like completers",
9999
"common": "common completers",
100100
"darwin": "macos completers",
101101
"linux": "linux completers",
102-
"system": "system specs",
103102
"unix": "unix-like completers",
104103
"user": "user specs",
104+
"system": "system specs",
105105
"windows": "windows completers",
106106
}
107107

0 commit comments

Comments
 (0)