Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

690 B
Raw Blame
// Package genautocomplete provides the completion command.
package genautocomplete

import (
	"github.com/rclone/rclone/cmd"
	"github.com/spf13/cobra"
)

func init() {
	cmd.Root.AddCommand(completionDefinition)
}

var completionDefinition = &cobra.Command{
	Use:   "completion [shell]",
	Short: `Output completion script for a given shell.`,
	Long: `Generates a shell completion script for rclone.
Run with ` + "`--help`" + ` to list the supported shells.
Enum-valued flags such as ` + "`--log-level`" + ` and ` + "`--vfs-cache-mode`" + `
also complete their supported values.`,
	Annotations: map[string]string{
		"versionIntroduced": "v1.33",
	},
	Aliases: []string{"genautocomplete"},
}