From 958759a71955860b01b17bd3bebf38f9dae1018e Mon Sep 17 00:00:00 2001 From: cdoern Date: Fri, 13 May 2022 10:52:57 -0400 Subject: podman pod clone implement podman pod clone, a command to create an exact copy of a pod while changing certain config elements current supported flags are: --name change the pod name --destroy remove the original pod --start run the new pod on creation and all infra-container related flags from podman pod create (namespaces etc) resolves #12843 Signed-off-by: cdoern --- cmd/podman/common/completion.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmd/podman/common/completion.go') diff --git a/cmd/podman/common/completion.go b/cmd/podman/common/completion.go index 07dcc4e6a..aeb051001 100644 --- a/cmd/podman/common/completion.go +++ b/cmd/podman/common/completion.go @@ -1607,8 +1607,14 @@ func AutocompleteClone(cmd *cobra.Command, args []string, toComplete string) ([] } switch len(args) { case 0: + if cmd.Parent().Name() == "pod" { // needs to be " pod " to exclude 'podman' + return getPods(cmd, toComplete, completeDefault) + } return getContainers(cmd, toComplete, completeDefault) case 2: + if cmd.Parent().Name() == "pod" { + return nil, cobra.ShellCompDirectiveNoFileComp + } return getImages(cmd, toComplete) } return nil, cobra.ShellCompDirectiveNoFileComp -- cgit v1.2.3-54-g00ecf