Skip to content

Commit

Permalink
Merge pull request #54 from AntonioMeireles/ls-a-trim
Browse files Browse the repository at this point in the history
tweak 'ls -a' output (omit channels with no local images)
  • Loading branch information
AntonioMeireles committed Jan 12, 2016
2 parents 0544d0f + 5f76384 commit 965cb31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion list.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ func lsCommand(cmd *cobra.Command, args []string) (err error) {
}
fmt.Println("locally available images")
for _, i := range channels {
fmt.Printf(" - %s channel \n", i)
var header bool
for _, d := range local[i] {
if !header {
fmt.Printf(" - %s channel \n", i)
header = true
}
fmt.Println(" -", d.String())
}
}
Expand Down

0 comments on commit 965cb31

Please sign in to comment.