From d3e84881bb9d746867059560d259934eb84f22dd Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Wed, 11 May 2022 19:38:41 +1000 Subject: [PATCH] remove custom command from default config given that it is now inbuilt --- docs/Config.md | 19 +++++++++++++------ pkg/config/app_config.go | 14 ++++---------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/Config.md b/docs/Config.md index 56af7d2b..485d28e3 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -46,12 +46,6 @@ commandTemplates: dockerComposeConfig: '{{ .DockerCompose }} config' checkDockerComposeConfig: '{{ .DockerCompose }} config --quiet' serviceTop: '{{ .DockerCompose }} top {{ .Service.Name }}' -customCommands: - containers: - - name: bash - attach: true - command: "docker exec -it {{ .Container.ID }} /bin/sh -c 'eval $(grep ^$(id -un): /etc/passwd | cut -d : -f 7-)'" - serviceNames: [] oS: openCommand: open {{filename}} openLinkCommand: open {{link}} @@ -84,3 +78,16 @@ The available attributes are: - bold - reverse # useful for high-contrast - underline + +## Custom Commands + +You can add custom commands like so: + +```yaml +customCommands: + containers: + - name: bash + attach: true + command: 'docker exec -it {{ .Container.ID }} bash' + serviceNames: [] +``` diff --git a/pkg/config/app_config.go b/pkg/config/app_config.go index 1653b253..a537157d 100644 --- a/pkg/config/app_config.go +++ b/pkg/config/app_config.go @@ -339,16 +339,10 @@ func GetDefaultConfig() UserConfig { ViewContainerLogs: "docker logs --timestamps --follow --since=60m {{ .Container.ID }}", }, CustomCommands: CustomCommands{ - Containers: []CustomCommand{ - { - Name: "bash", - Command: "docker exec -it {{ .Container.ID }} /bin/sh -c 'eval $(grep ^$(id -un): /etc/passwd | cut -d : -f 7-)'", - Attach: true, - }, - }, - Services: []CustomCommand{}, - Images: []CustomCommand{}, - Volumes: []CustomCommand{}, + Containers: []CustomCommand{}, + Services: []CustomCommand{}, + Images: []CustomCommand{}, + Volumes: []CustomCommand{}, }, BulkCommands: CustomCommands{ Services: []CustomCommand{