Skip to content

Commit

Permalink
Merge pull request #2399 from carapace-sh/docker-containers-all
Browse files Browse the repository at this point in the history
docker: ActionContainers - complete all containers
  • Loading branch information
rsteube authored Jun 2, 2024
2 parents 6bbcbc8 + 2246210 commit 22dabc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/actions/tools/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func ActionConfigs() carapace.Action {
// crazy_satoshi (alpine (Up 4 seconds))
func ActionContainers() carapace.Action {
return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
return carapace.ActionExecCommand("docker", "container", "ls", "--format", "{{.Names}}\n{{.Image}} ({{.Status}})", "--filter", "name="+c.Value)(func(output []byte) carapace.Action {
return carapace.ActionExecCommand("docker", "container", "ls", "--all", "--format", "{{.Names}}\n{{.Image}} ({{.Status}})", "--filter", "name="+c.Value)(func(output []byte) carapace.Action {
vals := strings.Split(string(output), "\n")
return carapace.ActionValuesDescribed(vals[:len(vals)-1]...).Style(styles.Docker.Container)
})
Expand Down

0 comments on commit 22dabc2

Please sign in to comment.