Docs: explain go templates in custom commands (#428)

This commit is contained in:
John Chavez 2023-07-21 01:08:06 -07:00 committed by GitHub
parent ab8d87e6ae
commit 66f5d176d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,6 +104,11 @@ customCommands:
serviceNames: [] 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 ## Replacements
You can add replacements like so: You can add replacements like so: