mirror of
https://github.com/rclone/rclone.git
synced 2026-02-21 11:53:23 +00:00
rc: fix missing --rc flags
In this commit we accidentally removed the global --rc flags.
0df7466d2b cmd/rcd: Fix command docs to include command specific prefix (#6675)
This re-instates them.
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/rclone/rclone/fs/config/configflags"
|
||||
"github.com/rclone/rclone/fs/filter/filterflags"
|
||||
"github.com/rclone/rclone/fs/log/logflags"
|
||||
"github.com/rclone/rclone/fs/rc/rcflags"
|
||||
"github.com/rclone/rclone/lib/atexit"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
@@ -173,6 +174,7 @@ func setupRootCommand(rootCmd *cobra.Command) {
|
||||
// Add global flags
|
||||
configflags.AddFlags(ci, pflag.CommandLine)
|
||||
filterflags.AddFlags(pflag.CommandLine)
|
||||
rcflags.AddFlags(pflag.CommandLine)
|
||||
logflags.AddFlags(pflag.CommandLine)
|
||||
|
||||
Root.Run = runRoot
|
||||
|
||||
@@ -15,11 +15,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// flagPrefix is the prefix used to uniquely identify command line flags.
|
||||
const flagPrefix = "rc-"
|
||||
|
||||
func init() {
|
||||
rcflags.AddFlags(cmd.Root.Flags(), flagPrefix)
|
||||
cmd.Root.AddCommand(commandDefinition)
|
||||
}
|
||||
|
||||
@@ -36,7 +32,7 @@ for GET requests on the URL passed in. It will also open the URL in
|
||||
the browser when rclone is run.
|
||||
|
||||
See the [rc documentation](/rc/) for more info on the rc flags.
|
||||
` + libhttp.Help(flagPrefix) + libhttp.TemplateHelp(flagPrefix) + libhttp.AuthHelp(flagPrefix),
|
||||
` + libhttp.Help(rcflags.FlagPrefix) + libhttp.TemplateHelp(rcflags.FlagPrefix) + libhttp.AuthHelp(rcflags.FlagPrefix),
|
||||
Annotations: map[string]string{
|
||||
"versionIntroduced": "v1.45",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user