Skip to content

Commit

Permalink
add image to conatiner view.
Browse files Browse the repository at this point in the history
Update issue: jesseduffield#144
  • Loading branch information
sword2ya committed Aug 2, 2019
1 parent 8970352 commit f494c44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/commands/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ type ContainerCliStat struct {

// GetDisplayStrings returns the dispaly string of Container
func (c *Container) GetDisplayStrings(isFocused bool) []string {
return []string{c.GetDisplayStatus(), c.Name, c.GetDisplayCPUPerc()}
image := c.Container.Image
if strings.HasPrefix(image, "sha256:") {
image = image[7:20]
}
return []string{c.GetDisplayStatus(), c.Name, image, c.GetDisplayCPUPerc()}
}

// GetDisplayStatus returns the colored status of the container
Expand Down

0 comments on commit f494c44

Please sign in to comment.