genautocomplete.go 576 B

12345678910111213141516171819202122232425
  1. // Package genautocomplete provides the genautocomplete command.
  2. package genautocomplete
  3. import (
  4. "github.com/rclone/rclone/cmd"
  5. "github.com/spf13/cobra"
  6. )
  7. func init() {
  8. cmd.Root.AddCommand(completionDefinition)
  9. }
  10. var completionDefinition = &cobra.Command{
  11. Use: "completion [shell]",
  12. Short: `Output completion script for a given shell.`,
  13. Long: `
  14. Generates a shell completion script for rclone.
  15. Run with ` + "`--help`" + ` to list the supported shells.
  16. `,
  17. Annotations: map[string]string{
  18. "versionIntroduced": "v1.33",
  19. },
  20. Aliases: []string{"genautocomplete"},
  21. }