summaryrefslogtreecommitdiff
path: root/cmd/podman/registry
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-07-14 13:32:55 -0400
committerMatthew Heon <matthew.heon@pm.me>2022-07-26 13:34:12 -0400
commite4b82c77f7214a6d69c2a6112900dae92d505dc6 (patch)
tree02fb338baf35259592b4dc957f502fe7c3efa942 /cmd/podman/registry
parent183fdea5f595886c799f804d3e7483d3bb0139c8 (diff)
downloadpodman-e4b82c77f7214a6d69c2a6112900dae92d505dc6.tar.gz
podman-e4b82c77f7214a6d69c2a6112900dae92d505dc6.tar.bz2
podman-e4b82c77f7214a6d69c2a6112900dae92d505dc6.zip
Add --host and -H as equivalent options to --url
Docker supports -H and --host for specify the listening socket. Podman should support them also in order to match the CLI. These will not be documented since Podman defaults to using the --url option. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/registry')
-rw-r--r--cmd/podman/registry/remote.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/registry/remote.go b/cmd/podman/registry/remote.go
index 181ef6b4a..afe32e0b9 100644
--- a/cmd/podman/registry/remote.go
+++ b/cmd/podman/registry/remote.go
@@ -31,11 +31,11 @@ func IsRemote() bool {
fs.SetInterspersed(false)
fs.BoolVarP(&remoteFromCLI.Value, "remote", "r", remote, "")
connectionFlagName := "connection"
- ignoredConnection := ""
- fs.StringVarP(&ignoredConnection, connectionFlagName, "c", "", "")
+ fs.StringP(connectionFlagName, "c", "", "")
+ hostFlagName := "host"
+ fs.StringP(hostFlagName, "H", "", "")
urlFlagName := "url"
- ignoredURL := ""
- fs.StringVar(&ignoredURL, urlFlagName, "", "")
+ fs.String(urlFlagName, "", "")
// The shell completion logic will call a command called "__complete" or "__completeNoDesc"
// This command will always be the second argument
@@ -46,7 +46,7 @@ func IsRemote() bool {
}
_ = fs.Parse(os.Args[start:])
// --connection or --url implies --remote
- remoteFromCLI.Value = remoteFromCLI.Value || fs.Changed(connectionFlagName) || fs.Changed(urlFlagName)
+ remoteFromCLI.Value = remoteFromCLI.Value || fs.Changed(connectionFlagName) || fs.Changed(urlFlagName) || fs.Changed(hostFlagName)
})
return podmanOptions.EngineMode == entities.TunnelMode || remoteFromCLI.Value
}