summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/completion.go10
-rw-r--r--cmd/podman/common/create.go7
-rw-r--r--cmd/podman/common/volumes.go2
3 files changed, 10 insertions, 9 deletions
diff --git a/cmd/podman/common/completion.go b/cmd/podman/common/completion.go
index 83fe0723c..d01842998 100644
--- a/cmd/podman/common/completion.go
+++ b/cmd/podman/common/completion.go
@@ -982,9 +982,10 @@ func AutocompletePsFilters(cmd *cobra.Command, args []string, toComplete string)
return []string{define.HealthCheckHealthy,
define.HealthCheckUnhealthy}, cobra.ShellCompDirectiveNoFileComp
},
- "label=": nil,
- "exited=": nil,
- "until=": nil,
+ "network=": func(s string) ([]string, cobra.ShellCompDirective) { return getNetworks(cmd, s) },
+ "label=": nil,
+ "exited=": nil,
+ "until=": nil,
}
return completeKeyValues(toComplete, kv)
}
@@ -1004,7 +1005,8 @@ func AutocompletePodPsFilters(cmd *cobra.Command, args []string, toComplete stri
"ctr-status=": func(_ string) ([]string, cobra.ShellCompDirective) {
return containerStatuses, cobra.ShellCompDirectiveNoFileComp
},
- "label=": nil,
+ "network=": func(s string) ([]string, cobra.ShellCompDirective) { return getNetworks(cmd, s) },
+ "label=": nil,
}
return completeKeyValues(toComplete, kv)
}
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index bbd4f6bae..280175f95 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -1,7 +1,6 @@
package common
import (
- "fmt"
"os"
"github.com/containers/common/pkg/auth"
@@ -181,7 +180,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *ContainerCLIOpts) {
createFlags.StringSliceVar(
&cf.Devices,
deviceFlagName, devices(),
- fmt.Sprintf("Add a host device to the container"),
+ "Add a host device to the container",
)
_ = cmd.RegisterFlagCompletionFunc(deviceFlagName, completion.AutocompleteDefault)
@@ -336,7 +335,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *ContainerCLIOpts) {
createFlags.BoolVar(
&cf.HTTPProxy,
- "http-proxy", true,
+ "http-proxy", containerConfig.Containers.HTTPProxy,
"Set proxy environment variables in the container based on the host proxy vars",
)
@@ -359,7 +358,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *ContainerCLIOpts) {
&cf.InitPath,
initPathFlagName, initPath(),
// Do not use the Value field for setting the default value to determine user input (i.e., non-empty string)
- fmt.Sprintf("Path to the container-init binary"),
+ "Path to the container-init binary",
)
_ = cmd.RegisterFlagCompletionFunc(initPathFlagName, completion.AutocompleteDefault)
diff --git a/cmd/podman/common/volumes.go b/cmd/podman/common/volumes.go
index dfbb7b1b2..a6e6faeca 100644
--- a/cmd/podman/common/volumes.go
+++ b/cmd/podman/common/volumes.go
@@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"
- "github.com/containers/buildah/pkg/parse"
+ "github.com/containers/common/pkg/parse"
"github.com/containers/podman/v2/pkg/specgen"
"github.com/containers/podman/v2/pkg/util"
spec "github.com/opencontainers/runtime-spec/specs-go"