Add optional command extensions
This commit is contained in:
@@ -101,6 +101,29 @@ dosh import-ssh palav homelab
|
||||
This appends entries to `~/.config/dosh/hosts.toml` without trying to become an
|
||||
OpenSSH config parser.
|
||||
|
||||
## Optional Command Extensions
|
||||
|
||||
Dosh can expose companion tools without taking a dependency on them. Command
|
||||
extensions live in client or host config and expand only the first trailing word:
|
||||
|
||||
```toml
|
||||
[extensions.tm]
|
||||
command = "tm {args}"
|
||||
description = "Open the server-side tmux dashboard"
|
||||
```
|
||||
|
||||
With that config, `dosh palav tm` runs `tm` in the remote Dosh shell and
|
||||
`dosh palav tm dosh` runs `tm 'dosh'`. Removing the table removes the integration.
|
||||
Host config can override a global extension, or disable it:
|
||||
|
||||
```toml
|
||||
[palav.extensions.tm]
|
||||
command = "/opt/tm/bin/tm {args}"
|
||||
|
||||
[other-host.extensions.tm]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
## Forwarding (Implemented)
|
||||
|
||||
SSH forwarding cannot be copied by keeping the bootstrap SSH connection open,
|
||||
|
||||
Reference in New Issue
Block a user