2022-08-28 19:21:57 +08:00
|
|
|
// Package genautocomplete provides the genautocomplete command.
|
2016-08-06 00:12:27 +08:00
|
|
|
package genautocomplete
|
|
|
|
|
|
|
|
import (
|
2019-07-29 01:47:38 +08:00
|
|
|
"github.com/rclone/rclone/cmd"
|
2016-08-06 00:12:27 +08:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2017-08-31 22:52:51 +08:00
|
|
|
cmd.Root.AddCommand(completionDefinition)
|
2016-08-06 00:12:27 +08:00
|
|
|
}
|
|
|
|
|
2017-08-31 22:52:51 +08:00
|
|
|
var completionDefinition = &cobra.Command{
|
2023-05-25 21:32:40 +08:00
|
|
|
Use: "completion [shell]",
|
2017-08-31 22:52:51 +08:00
|
|
|
Short: `Output completion script for a given shell.`,
|
2016-08-06 00:12:27 +08:00
|
|
|
Long: `
|
2017-08-31 22:52:51 +08:00
|
|
|
Generates a shell completion script for rclone.
|
2022-06-20 01:55:37 +08:00
|
|
|
Run with ` + "`--help`" + ` to list the supported shells.
|
2016-08-06 00:12:27 +08:00
|
|
|
`,
|
2022-11-27 06:40:49 +08:00
|
|
|
Annotations: map[string]string{
|
|
|
|
"versionIntroduced": "v1.33",
|
|
|
|
},
|
2023-05-25 21:32:40 +08:00
|
|
|
Aliases: []string{"genautocomplete"},
|
2016-08-06 00:12:27 +08:00
|
|
|
}
|