Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Oct 13, 2023
1 parent ee25832 commit 478cde5
Show file tree
Hide file tree
Showing 14 changed files with 118 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@
- [v0.28](./changelog/v0.28.md)
- [v0.27](./changelog/v0.27.md)
- [v0.26](./changelog/v0.26.md)
- [v0.25](./changelog/v0.25.md)
- [v0.24](./changelog/v0.24.md)
- [v0.23](./changelog/v0.23.md)
- [v0.22](./changelog/v0.22.md)
- [v0.21](./changelog/v0.21.md)
- [v0.20](./changelog/v0.20.md)
- [v0.19](./changelog/v0.19.md)
- [v0.18](./changelog/v0.18.md)
- [v0.17](./changelog/v0.17.md)
85 changes: 85 additions & 0 deletions docs/src/changelog/v0.17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# v0.17 - Spec-tacular Citizen

![](./v0.17/banner.png)

[Specs] are now first-class citizens in carapace. They are integrated on root level and should behave similar to the existing completers (`carapace [spec.name] <TAB>`).

## List

Completers based on [Specs] are highlighted in shells that support colors (details: `carapace --list=json`):

![](./v0.17/list.png)

## Bridge

Using [Specs] for [bridging](https://rsteube.github.io/carapace-bin/bridge.html) is from now on the recommended approach.
As these are auto-loaded with `carapace _carapace` and provide support for embedded completion like `sudo [spec.name] <TAB>`.

Existing completers with the same name will also be overridden.
E.g. `kubectl` (which is currently a bit outdated) can be configured to use the official completer:

```yaml
# ${UserConfigDir}/carapace/specs/kubectl.yaml
name: kubectl
description: kubectl controls the Kubernetes cluster manager
completion:
positionalany: ["$_bridge.Cobra(kubectl)"]
```
> Note that bridging adds a slight overhead (~7-9ms?) for each invocation and is limited to supported frameworks / commands.
## Plugin
Taking this one step further plugin completion like `cargo-[plugin]`, `gh-[plugin]`, `git-[plugin]` can now also be defined by [Specs].

E.g. the [gh-repo-collab](https://github.com/mislav/gh-repo-collab) extension for [github-cli](https://cli.github.com/):
```yaml
# ${UserConfigDir}/carapace/specs/gh-repo-collab.yaml
name: gh-repo-collab
description: manage repository collaborators
commands:
-
name: list
completion:
positional:
- ["$_tools.gh.OwnerRepositories"]
-
name: add
flags:
--permission=: set permission
completion:
flag:
permission: ["pull", "triage", "push", "maintain", "admin\t\tred"]
positional:
- ["$_tools.gh.OwnerRepositories"]
- ["$_tools.gh.Users"]
-
name: remove
completion:
positional:
- ["$_tools.gh.OwnerRepositories"]
- ["$_tools.gh.Users"]
```

![](./v0.17/plugin.png)

## Nushell

With https://github.com/nushell/nushell/pull/6652 (upcoming [v0.70.0](https://github.com/nushell/nushell/milestone/11?closed=1)) the [nushell] integration is now working on positional arguments.
The recommended configuration is equivalent to the example configuration in `config.nu`:

```nu
let carapace_completer = {|spans|
carapace $spans.0 nushell $spans | from json
}
let-env config = {
external_completer: $carapace_completer
}
```

> Be sure to remove the `module completions` example so that it won't override the carapace completion

[nushell]:https://www.nushell.sh/
[Specs]:https://github.com/rsteube/carapace-spec
Binary file added docs/src/changelog/v0.17/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/changelog/v0.17/list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/changelog/v0.17/plugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/src/changelog/v0.18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# v0.18
1 change: 1 addition & 0 deletions docs/src/changelog/v0.19.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# v0.19
1 change: 1 addition & 0 deletions docs/src/changelog/v0.20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# v0.20
1 change: 1 addition & 0 deletions docs/src/changelog/v0.21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# v0.21
1 change: 1 addition & 0 deletions docs/src/changelog/v0.22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# v0.22
1 change: 1 addition & 0 deletions docs/src/changelog/v0.23.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# v0.23
17 changes: 17 additions & 0 deletions docs/src/changelog/v0.24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# v0.24 - Spring Cleaning

![](./v0.24/banner.png)

## carapace-bridge

Moved bridge actions to [carapace-bridge].
The shell bridges now use custom configs at [`${UserConfigDir}/carapace/bridge`]
(e.g. `~/.config/carapace/bridge/fish/config.fish` instead of `~/.config/fish/config.fish`).

## removed flags

Removed `--bridge` and `--spec` flags as user specs are preferred and there are [carapace-bridge] and [carapace-spec] as well.

[`${UserConfigDir}/carapace/bridge`]:https://pkg.go.dev/os#UserConfigDir
[carapace-bridge]:https://github.com/rsteube/carapace-bridge
[carapace-spec]:https://github.com/rsteube/carapace-spec
Binary file added docs/src/changelog/v0.24/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/src/changelog/v0.25.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# v0.25

0 comments on commit 478cde5

Please sign in to comment.