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