mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-22 23:21:03 +00:00
Docs: explain go templates in custom commands (#428)
This commit is contained in:
parent
ab8d87e6ae
commit
66f5d176d3
1 changed files with 6 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ gui:
|
|||
# Side panel width as a ratio of the screen's width
|
||||
sidePanelWidth: 0.333
|
||||
# Determines whether we show the bottom line (the one containing keybinding
|
||||
# info and the status of the app).
|
||||
# info and the status of the app).
|
||||
showBottomLine: true
|
||||
# When true, increases vertical space used by focused side panel,
|
||||
# creating an accordion effect
|
||||
|
|
@ -104,6 +104,11 @@ customCommands:
|
|||
serviceNames: []
|
||||
```
|
||||
|
||||
You may use the following go templates (such as `{{ .Container.ID }}` above) in your commands:
|
||||
- `{{ .DockerCompose }}`: the docker compose command (default: `docker-compose`)
|
||||
- [`{{ .Container }}`](https://pkg.go.dev/github.com/jesseduffield/lazydocker@v0.20.0/pkg/commands#Container) and its fields. For example: `{{ .Container.Container.ImageID }}`
|
||||
- [`{{ .Service }}`](https://pkg.go.dev/github.com/jesseduffield/lazydocker@v0.20.0/pkg/commands#Service) and its fields. For example: `{{ .Service.Name }}`
|
||||
|
||||
## Replacements
|
||||
|
||||
You can add replacements like so:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue