aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/system
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/system')
-rw-r--r--cmd/podman/system/connection/list.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/podman/system/connection/list.go b/cmd/podman/system/connection/list.go
index 2f74215c1..de85ce3fa 100644
--- a/cmd/podman/system/connection/list.go
+++ b/cmd/podman/system/connection/list.go
@@ -3,6 +3,7 @@ package connection
import (
"fmt"
"os"
+ "sort"
"github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/config"
@@ -77,6 +78,10 @@ func list(cmd *cobra.Command, _ []string) error {
rows = append(rows, r)
}
+ sort.Slice(rows, func(i, j int) bool {
+ return rows[i].Name < rows[j].Name
+ })
+
format := "{{.Name}}\t{{.Identity}}\t{{.URI}}\n"
switch {
case report.IsJSON(cmd.Flag("format").Value.String()):