Skip to content

Commit

Permalink
Merge pull request #1352 from rsteube/doc-spec-bridge
Browse files Browse the repository at this point in the history
doc: spec - added bridge documentation
  • Loading branch information
rsteube authored Oct 8, 2022
2 parents 953b2c7 + 9227668 commit b07c4f1
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [Bridge](./bridge.md)
- [Style](./style.md)
- [Spec](./spec.md)
- [Bridge](./spec/bride.md)
- [Examples](./spec/examples.md)
- [Macros](./spec/macros.md)
- [Development](./development.md)
Expand Down
99 changes: 99 additions & 0 deletions docs/src/spec/bride.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Bridge

## Argcomplete

[kislyuk/argcomplete] based commands can be bridged with the [bridge.Argcomplete(\<COMMAND\>)] macro:

```yaml
name: az
description: Azure Command-Line Interface
completion:
positionalany: ["$_bridge.Argcomplete(az)"]
````

## Carapace

[rsteube/carapace] based commands can be bridged with the [bridge.Carapace(\<COMMAND\>)] macro:

```yaml
name: freckles
description: simple dotfile manager
completion:
positionalany: ["$_bridge.Carapace(freckles)"]
````
## CarapaceBin
[Completers](../completers.md) and [Specs](../spec.md) registered in [rsteube/carapace-bin] can be bridged with the [bridge.CarapaceBin(\<COMMAND\>)] macro:
```yaml
name: gh
description: Work seamlessly with GitHub from the command line
completion:
positionalany: ["$_bridge.CarapaceBin(gh)"]
````

## Click

[pallets/click] based commands can be bridged with the [bridge.Click(\<COMMAND\>)] macro:

```yaml
name: watson
description: Watson is a tool aimed at helping you monitoring your time
completion:
positionalany: ["$_bridge.Click(watson)"]
````
## Cobra
[spf13/cobra] based commands can be bridged with the [bridge.Cobra(\<COMMAND\>)] macro:
```yaml
name: kubectl
description: kubectl controls the Kubernetes cluster manager
completion:
positionalany: ["$_bridge.Cobra(kubectl)"]
````

## Fish

Commands registered in [fish-shell/fish-shell] can be bridged with the [bridge.Fish(\<COMMAND\>)] macro:

```yaml
name: git
description: the stupid content tracker
completion:
positionalany: ["$_bridge.Fish(git)"]
````
## Posener (TODO: rename to `Complete`)
[posener/complete] based commands can be bridged with the [bridge.Posener(\<COMMAND\>)] macro:

```yaml
name: vault
description: Manage Secrets & Protect Sensitive Data
completion:
positionalany: ["$_bridge.Posener(vault)"]
````
[kislyuk/argcomplete]:https://github.com/kislyuk/argcomplete
[bridge.Argcomplete(\<COMMAND\>)]:https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/bridge#ActionArgcomplete
[rsteube/carapace]:https://github.com/rsteube/carapace
[bridge.Carapace(\<COMMAND\>)]:https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/bridge#ActionCarapace
[rsteube/carapace-bin]:https://github.com/rsteube/carapace-bin
[bridge.CarapaceBin(\<COMMAND\>)]:https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/bridge#ActionCarapaceBin
[pallets/click]:https://github.com/pallets/click
[bridge.Click(\<COMMAND\>)]:https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/bridge#ActionClick
[spf13/cobra]:https://github.com/spf13/cobra
[bridge.Cobra(\<COMMAND\>)]:https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/bridge#ActionCobra
[fish-shell/fish-shell]:https://github.com/fish-shell/fish-shell
[bridge.Fish(\<COMMAND\>)]:https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/bridge#ActionFish
[posener/complete]:https://github.com/posener/complete
[bridge.Posener(\<COMMAND\>)]:https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/bridge#ActionPosener

0 comments on commit b07c4f1

Please sign in to comment.