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