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

help: global flags help command now takes glob filter

albertonyc6352231e43c
diff --git a/cmd/help.go b/cmd/help.go
index 5d2dbce73..ee01b7840 100644
--- a/cmd/help.go
+++ b/cmd/help.go
@@ -12,6 +12,7 @@ import (
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/config/configflags"
"github.com/rclone/rclone/fs/config/flags"
+ "github.com/rclone/rclone/fs/filter"
"github.com/rclone/rclone/fs/filter/filterflags"
"github.com/rclone/rclone/fs/log/logflags"
"github.com/rclone/rclone/fs/rc/rcflags"
@@ -62,14 +63,15 @@ var flagsRe *regexp.Regexp
// Show the flags
var helpFlags = &cobra.Command{
- Use: "flags [<regexp to match>]",
+ Use: "flags [<filter>]",
Short: "Show the global flags for rclone",
Run: func(command *cobra.Command, args []string) {
if len(args) > 0 {
- re, err := regexp.Compile(`(?i)` + args[0])
+ re, err := filter.GlobStringToRegexp(args[0], false)
if err != nil {
log.Fatalf("Failed to compile flags regexp: %v", err)
}
+ fs.Debugf(nil, "Flags filter: %s", re.String())
flagsRe = re
}
if GeneratingDocs {