2016-08-05 16:12:27 +00:00
|
|
|
package genautocomplete
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ncw/rclone/cmd"
|
|
|
|
"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{
|
|
|
|
Use: "genautocomplete [shell]",
|
|
|
|
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.
|
|
|
|
Run with --help to list the supported shells.
|
2016-08-05 16:12:27 +00:00
|
|
|
`,
|
|
|
|
}
|