aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/system/df.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/system/df.go')
-rw-r--r--cmd/podman/system/df.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/cmd/podman/system/df.go b/cmd/podman/system/df.go
index fbdf274fb..a9eab24bb 100644
--- a/cmd/podman/system/df.go
+++ b/cmd/podman/system/df.go
@@ -8,6 +8,7 @@ import (
"text/template"
"time"
+ "github.com/containers/common/pkg/completion"
"github.com/containers/common/pkg/report"
"github.com/containers/podman/v2/cmd/podman/parse"
"github.com/containers/podman/v2/cmd/podman/registry"
@@ -24,11 +25,12 @@ var (
Show podman disk usage
`
dfSystemCommand = &cobra.Command{
- Use: "df [options]",
- Args: validate.NoArgs,
- Short: "Show podman disk usage",
- Long: dfSystemDescription,
- RunE: df,
+ Use: "df [options]",
+ Args: validate.NoArgs,
+ Short: "Show podman disk usage",
+ Long: dfSystemDescription,
+ RunE: df,
+ ValidArgsFunction: completion.AutocompleteNone,
}
)
@@ -44,7 +46,11 @@ func init() {
})
flags := dfSystemCommand.Flags()
flags.BoolVarP(&dfOptions.Verbose, "verbose", "v", false, "Show detailed information on disk usage")
- flags.StringVar(&dfOptions.Format, "format", "", "Pretty-print images using a Go template")
+
+ formatFlagName := "format"
+ flags.StringVar(&dfOptions.Format, formatFlagName, "", "Pretty-print images using a Go template")
+ _ = dfSystemCommand.RegisterFlagCompletionFunc(formatFlagName, completion.AutocompleteNone)
+
}
func df(cmd *cobra.Command, args []string) error {