"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
rc: fix missing --rc flags
Nick Craig-Wood48ec00cc1af4
diff --git a/cmd/help.go b/cmd/help.goindex c0371089a..ecc34b63e 100644--- a/cmd/help.go+++ b/cmd/help.go@@ -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 flagsconfigflags.AddFlags(ci, pflag.CommandLine)filterflags.AddFlags(pflag.CommandLine)+ rcflags.AddFlags(pflag.CommandLine)logflags.AddFlags(pflag.CommandLine)Root.Run = runRootdiff --git a/cmd/rcd/rcd.go b/cmd/rcd/rcd.goindex 542a287b0..8e90240d1 100644--- a/cmd/rcd/rcd.go+++ b/cmd/rcd/rcd.go@@ -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 inthe 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",},diff --git a/fs/rc/rcflags/rcflags.go b/fs/rc/rcflags/rcflags.goindex b51e7bf3f..f323806c8 100644--- a/fs/rc/rcflags/rcflags.go+++ b/fs/rc/rcflags/rcflags.go@@ -7,13 +7,16 @@ import ("github.com/spf13/pflag")+// FlagPrefix is the prefix used to uniquely identify command line flags.+const FlagPrefix = "rc-"+// Options set by command line flagsvar (Opt = rc.DefaultOpt)// AddFlags adds the remote control flags to the flagSet-func AddFlags(flagSet *pflag.FlagSet, commonFlagPrefix string) {+func AddFlags(flagSet *pflag.FlagSet) {rc.AddOption("rc", &Opt)flags.BoolVarP(flagSet, &Opt.Enabled, "rc", "", false, "Enable the remote control server")flags.StringVarP(flagSet, &Opt.Files, "rc-files", "", "", "Path to local files to serve on the HTTP server")@@ -28,7 +31,7 @@ func AddFlags(flagSet *pflag.FlagSet, commonFlagPrefix string) {flags.BoolVarP(flagSet, &Opt.EnableMetrics, "rc-enable-metrics", "", false, "Enable prometheus metrics on /metrics")flags.DurationVarP(flagSet, &Opt.JobExpireDuration, "rc-job-expire-duration", "", Opt.JobExpireDuration, "Expire finished async jobs older than this value")flags.DurationVarP(flagSet, &Opt.JobExpireInterval, "rc-job-expire-interval", "", Opt.JobExpireInterval, "Interval to check for expired async jobs")- Opt.HTTP.AddFlagsPrefix(flagSet, commonFlagPrefix)- Opt.Auth.AddFlagsPrefix(flagSet, commonFlagPrefix)- Opt.Template.AddFlagsPrefix(flagSet, commonFlagPrefix)+ Opt.HTTP.AddFlagsPrefix(flagSet, FlagPrefix)+ Opt.Auth.AddFlagsPrefix(flagSet, FlagPrefix)+ Opt.Template.AddFlagsPrefix(flagSet, FlagPrefix)}