diff --git a/pkg/generate/rewrite.go b/pkg/generate/rewrite.go index e32825beb5..fa7ca9d425 100644 --- a/pkg/generate/rewrite.go +++ b/pkg/generate/rewrite.go @@ -23,21 +23,22 @@ import ( ) type rewrite struct { - flag string - description string + flag string + usage string + defaultVal string } // rewriteFlags rewrites flags that are dependent on operating system -// for example, for `minikube start`, the description of --driver +// for example, for `minikube start`, the usage of --driver // outputs possible drivers for the operating system func rewriteFlags(command *cobra.Command) error { rewrites := map[string][]rewrite{ "start": []rewrite{{ - flag: "driver", - description: "Used to specify the driver to run kubernetes in. The list of available drivers depends on operating system.", + flag: "driver", + usage: "Used to specify the driver to run kubernetes in. The list of available drivers depends on operating system.", }, { - flag: "mount-string", - description: "The argument to pass the minikube mount command on start.", + flag: "mount-string", + usage: "The argument to pass the minikube mount command on start.", }}, } rws, ok := rewrites[command.Name()] @@ -49,7 +50,8 @@ func rewriteFlags(command *cobra.Command) error { if flag == nil { return fmt.Errorf("--%s is not a valid flag for %s", r.flag, command.Name()) } - flag.Usage = r.description + flag.Usage = r.usage + flag.DefValue = r.defaultVal } return nil } diff --git a/site/content/en/docs/Reference/Commands/start.md b/site/content/en/docs/Reference/Commands/start.md index 92cda2ac9a..ce1fa0af1e 100644 --- a/site/content/en/docs/Reference/Commands/start.md +++ b/site/content/en/docs/Reference/Commands/start.md @@ -72,7 +72,7 @@ minikube start [flags] --kvm-qemu-uri string The KVM QEMU connection URI. (kvm2 driver only) (default "qemu:///system") --memory string Amount of RAM to allocate to Kubernetes (format: [], where unit = b, k, m or g). --mount This will start the mount daemon and automatically mount files into minikube. - --mount-string string The argument to pass the minikube mount command on start. (default "/Users:/minikube-host") + --mount-string string The argument to pass the minikube mount command on start. --nat-nic-type string NIC Type used for host only network. One of Am79C970A, Am79C973, 82540EM, 82543GC, 82545EM, or virtio (virtualbox driver only) (default "virtio") --native-ssh Use native Golang SSH client (default true). Set to 'false' to use the command line 'ssh' command when accessing the docker machine. Useful for the machine drivers when they will not start with 'Waiting for SSH'. (default true) --network-plugin string The name of the network plugin.