summaryrefslogtreecommitdiff
path: root/cmd/podman/machine/ssh.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2021-03-22 13:29:25 -0500
committerbaude <bbaude@redhat.com>2021-03-25 11:02:33 -0500
commit4ab8a6f67eb9de0de40d478cb0cbec05b1b725c0 (patch)
tree00743bf608cc5700fe8a7fca1bb3b0f3a4457b7d /cmd/podman/machine/ssh.go
parente7661137373b5f87bf6ec45e32326821b172ce7b (diff)
downloadpodman-4ab8a6f67eb9de0de40d478cb0cbec05b1b725c0.tar.gz
podman-4ab8a6f67eb9de0de40d478cb0cbec05b1b725c0.tar.bz2
podman-4ab8a6f67eb9de0de40d478cb0cbec05b1b725c0.zip
Improvements for machine
clean up ci failures and add appropriate arch,os exclusion tags Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/machine/ssh.go')
-rw-r--r--cmd/podman/machine/ssh.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/podman/machine/ssh.go b/cmd/podman/machine/ssh.go
index 32483f731..a7111a195 100644
--- a/cmd/podman/machine/ssh.go
+++ b/cmd/podman/machine/ssh.go
@@ -1,7 +1,9 @@
+// +build amd64,linux amd64,darwin arm64,darwin
+
package machine
import (
- "github.com/containers/common/pkg/completion"
+ "github.com/containers/podman/v3/cmd/podman/common"
"github.com/containers/podman/v3/cmd/podman/registry"
"github.com/containers/podman/v3/pkg/domain/entities"
"github.com/containers/podman/v3/pkg/machine"
@@ -14,13 +16,13 @@ var (
sshCmd = &cobra.Command{
Use: "ssh [options] NAME [COMMAND [ARG ...]]",
Short: "SSH into a virtual machine",
- Long: "SSH into a podman-managed virtual machine ",
+ Long: "SSH into a virtual machine ",
RunE: ssh,
Args: cobra.MinimumNArgs(1),
Example: `podman machine ssh myvm
podman machine ssh -e myvm echo hello`,
- ValidArgsFunction: completion.AutocompleteNone,
+ ValidArgsFunction: common.AutocompleteMachineSSH,
}
)
@@ -38,7 +40,6 @@ func init() {
flags := sshCmd.Flags()
executeFlagName := "execute"
flags.BoolVarP(&sshOpts.Execute, executeFlagName, "e", false, "Execute command from args")
- _ = sshCmd.RegisterFlagCompletionFunc(executeFlagName, completion.AutocompleteDefault)
}
func ssh(cmd *cobra.Command, args []string) error {