From 6d18f607251beffc4566e3e2391368f061f73a3c Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sat, 26 Nov 2022 23:40:49 +0100 Subject: [PATCH] docs: add minimum versions to the command pages --- cmd/about/about.go | 3 ++ cmd/authorize/authorize.go | 3 ++ cmd/backend/backend.go | 3 ++ cmd/bisync/cmd.go | 3 ++ cmd/cachestats/cachestats.go | 4 +++ cmd/cat/cat.go | 3 ++ cmd/check/check.go | 3 ++ cmd/checksum/checksum.go | 3 ++ cmd/cleanup/cleanup.go | 3 ++ cmd/config/config.go | 38 +++++++++++++++++++++++++- cmd/copy/copy.go | 3 ++ cmd/copyto/copyto.go | 3 ++ cmd/copyurl/copyurl.go | 3 ++ cmd/cryptcheck/cryptcheck.go | 3 ++ cmd/cryptdecode/cryptdecode.go | 3 ++ cmd/dedupe/dedupe.go | 3 ++ cmd/delete/delete.go | 3 ++ cmd/deletefile/deletefile.go | 3 ++ cmd/genautocomplete/genautocomplete.go | 3 ++ cmd/gendocs/gendocs.go | 3 ++ cmd/hashsum/hashsum.go | 3 ++ cmd/help.go | 3 ++ cmd/link/link.go | 3 ++ cmd/listremotes/listremotes.go | 3 ++ cmd/ls/ls.go | 3 ++ cmd/lsd/lsd.go | 3 ++ cmd/lsf/lsf.go | 3 ++ cmd/lsjson/lsjson.go | 3 ++ cmd/lsl/lsl.go | 3 ++ cmd/md5sum/md5sum.go | 3 ++ cmd/mkdir/mkdir.go | 3 ++ cmd/mountlib/mount.go | 3 ++ cmd/move/move.go | 3 ++ cmd/moveto/moveto.go | 3 ++ cmd/ncdu/ncdu.go | 3 ++ cmd/obscure/obscure.go | 3 ++ cmd/purge/purge.go | 3 ++ cmd/rc/rc.go | 3 ++ cmd/rcat/rcat.go | 3 ++ cmd/rcd/rcd.go | 3 ++ cmd/reveal/reveal.go | 3 ++ cmd/rmdir/rmdir.go | 3 ++ cmd/rmdirs/rmdirs.go | 3 ++ cmd/selfupdate/selfupdate.go | 3 ++ cmd/serve/dlna/dlna.go | 3 ++ cmd/serve/docker/docker.go | 4 ++- cmd/serve/ftp/ftp.go | 3 ++ cmd/serve/http/http.go | 3 ++ cmd/serve/restic/restic.go | 3 ++ cmd/serve/serve.go | 3 ++ cmd/serve/sftp/sftp.go | 3 ++ cmd/serve/webdav/webdav.go | 3 ++ cmd/settier/settier.go | 3 ++ cmd/sha1sum/sha1sum.go | 3 ++ cmd/size/size.go | 3 ++ cmd/sync/sync.go | 3 ++ cmd/test/changenotify/changenotify.go | 3 ++ cmd/test/histogram/histogram.go | 3 ++ cmd/test/info/info.go | 3 ++ cmd/test/makefiles/makefiles.go | 6 ++++ cmd/test/memory/memory.go | 3 ++ cmd/test/test.go | 3 ++ cmd/touch/touch.go | 3 ++ cmd/tree/tree.go | 3 ++ cmd/version/version.go | 3 ++ 65 files changed, 233 insertions(+), 2 deletions(-) diff --git a/cmd/about/about.go b/cmd/about/about.go index 967744b59..6d3afc91d 100644 --- a/cmd/about/about.go +++ b/cmd/about/about.go @@ -93,6 +93,9 @@ provided by a backend. Where the value is unlimited it is omitted. Some backends does not support the ` + "`rclone about`" + ` command at all, see complete list in [documentation](https://rclone.org/overview/#optional-features). `, + Annotations: map[string]string{ + "versionIntroduced": "v1.41", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) f := cmd.NewFsSrc(args) diff --git a/cmd/authorize/authorize.go b/cmd/authorize/authorize.go index 87dda815b..84c0bc0f3 100644 --- a/cmd/authorize/authorize.go +++ b/cmd/authorize/authorize.go @@ -30,6 +30,9 @@ rclone config. Use the --auth-no-open-browser to prevent rclone to open auth link in default browser automatically.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.27", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(1, 3, command, args) return config.Authorize(context.Background(), args, noAutoBrowser) diff --git a/cmd/backend/backend.go b/cmd/backend/backend.go index 3199f8a5d..67d499923 100644 --- a/cmd/backend/backend.go +++ b/cmd/backend/backend.go @@ -58,6 +58,9 @@ Pass arguments to the backend by placing them on the end of the line Note to run these commands on a running backend then see [backend/command](/rc/#backend-command) in the rc docs. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.52", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(2, 1e6, command, args) name, remote := args[0], args[1] diff --git a/cmd/bisync/cmd.go b/cmd/bisync/cmd.go index c14edf2e7..6f7c8fc15 100644 --- a/cmd/bisync/cmd.go +++ b/cmd/bisync/cmd.go @@ -115,6 +115,9 @@ var commandDefinition = &cobra.Command{ Use: "bisync remote1:path1 remote2:path2", Short: shortHelp, Long: longHelp, + Annotations: map[string]string{ + "versionIntroduced": "v1.58", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(2, 2, command, args) fs1, file1, fs2, file2 := cmd.NewFsSrcDstFiles(args) diff --git a/cmd/cachestats/cachestats.go b/cmd/cachestats/cachestats.go index 7638db8f4..f5cbf0095 100644 --- a/cmd/cachestats/cachestats.go +++ b/cmd/cachestats/cachestats.go @@ -25,6 +25,10 @@ var commandDefinition = &cobra.Command{ Print cache stats for a remote in JSON format `, Hidden: true, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + "status": "Deprecated", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fs.Logf(nil, `"rclone cachestats" is deprecated, use "rclone backend stats %s" instead`, args[0]) diff --git a/cmd/cat/cat.go b/cmd/cat/cat.go index ead361455..03ed4e6e3 100644 --- a/cmd/cat/cat.go +++ b/cmd/cat/cat.go @@ -57,6 +57,9 @@ the end and |--offset| and |--count| to print a section in the middle. Note that if offset is negative it will count from the end, so |--offset -1 --count 1| is equivalent to |--tail 1|. `, "|", "`"), + Annotations: map[string]string{ + "versionIntroduced": "v1.33", + }, Run: func(command *cobra.Command, args []string) { usedOffset := offset != 0 || count >= 0 usedHead := head > 0 diff --git a/cmd/check/check.go b/cmd/check/check.go index 3c126e176..e4bcc156a 100644 --- a/cmd/check/check.go +++ b/cmd/check/check.go @@ -155,6 +155,9 @@ to check all the data. If you supply the |--checkfile HASH| flag with a valid hash name, the |source:path| must point to a text file in the SUM format. `, "|", "`") + FlagsHelp, + Annotations: map[string]string{ + "versionIntroduced": "v0.90", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(2, 2, command, args) var ( diff --git a/cmd/checksum/checksum.go b/cmd/checksum/checksum.go index c25aa143d..4dee6611c 100644 --- a/cmd/checksum/checksum.go +++ b/cmd/checksum/checksum.go @@ -37,6 +37,9 @@ that don't support hashes or if you really want to check all the data. Note that hash values in the SUM file are treated as case insensitive. `, "|", "`") + check.FlagsHelp, + Annotations: map[string]string{ + "versionIntroduced": "v1.56", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(3, 3, command, args) var hashType hash.Type diff --git a/cmd/cleanup/cleanup.go b/cmd/cleanup/cleanup.go index e54577466..d23f0cb91 100644 --- a/cmd/cleanup/cleanup.go +++ b/cmd/cleanup/cleanup.go @@ -20,6 +20,9 @@ var commandDefinition = &cobra.Command{ Clean up the remote if possible. Empty the trash or delete old file versions. Not supported by all remotes. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.31", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) diff --git a/cmd/config/config.go b/cmd/config/config.go index 66b2a1c6d..5fb21a0cf 100644 --- a/cmd/config/config.go +++ b/cmd/config/config.go @@ -44,6 +44,9 @@ var configCommand = &cobra.Command{ remotes and manage existing ones. You may also set or remove a password to protect your configuration. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(0, 0, command, args) return config.EditConfig(context.Background()) @@ -54,12 +57,18 @@ var configEditCommand = &cobra.Command{ Use: "edit", Short: configCommand.Short, Long: configCommand.Long, - Run: configCommand.Run, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, + Run: configCommand.Run, } var configFileCommand = &cobra.Command{ Use: "file", Short: `Show path of configuration file in use.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.38", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 0, command, args) config.ShowConfigLocation() @@ -69,6 +78,9 @@ var configFileCommand = &cobra.Command{ var configTouchCommand = &cobra.Command{ Use: "touch", Short: `Ensure configuration file exists.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.56", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 0, command, args) config.SaveConfig() @@ -78,6 +90,9 @@ var configTouchCommand = &cobra.Command{ var configPathsCommand = &cobra.Command{ Use: "paths", Short: `Show paths used for configuration, cache, temp etc.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.57", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 0, command, args) fmt.Printf("Config file: %s\n", config.GetConfigPath()) @@ -89,6 +104,9 @@ var configPathsCommand = &cobra.Command{ var configShowCommand = &cobra.Command{ Use: "show []", Short: `Print (decrypted) config file, or the config for a single remote.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.38", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 1, command, args) if len(args) == 0 { @@ -103,6 +121,9 @@ var configShowCommand = &cobra.Command{ var configDumpCommand = &cobra.Command{ Use: "dump", Short: `Dump the config file as JSON.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(0, 0, command, args) return config.Dump() @@ -112,6 +133,9 @@ var configDumpCommand = &cobra.Command{ var configProvidersCommand = &cobra.Command{ Use: "providers", Short: `List in JSON format all the providers and options.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(0, 0, command, args) return config.JSONListProviders() @@ -226,6 +250,9 @@ using remote authorization you would do this: rclone config create mydrive drive config_is_local=false `, "|", "`") + configPasswordHelp, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(2, 256, command, args) in, err := argsToMap(args[2:]) @@ -289,6 +316,9 @@ require this add an extra parameter thus: rclone config update myremote env_auth=true config_refresh_token=false `, "|", "`") + configPasswordHelp, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(1, 256, command, args) in, err := argsToMap(args[1:]) @@ -304,6 +334,9 @@ require this add an extra parameter thus: var configDeleteCommand = &cobra.Command{ Use: "delete name", Short: "Delete an existing remote.", + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) config.DeleteRemote(args[0]) @@ -326,6 +359,9 @@ For example, to set password of a remote of name myremote you would do: This command is obsolete now that "config update" and "config create" both support obscuring passwords directly. `, "|", "`"), + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(1, 256, command, args) in, err := argsToMap(args[1:]) diff --git a/cmd/copy/copy.go b/cmd/copy/copy.go index c6e42a70e..6a365b252 100644 --- a/cmd/copy/copy.go +++ b/cmd/copy/copy.go @@ -83,6 +83,9 @@ recently very efficiently like this: **Note**: Use the |--dry-run| or the |--interactive|/|-i| flag to test without copying anything. `, "|", "`"), + Annotations: map[string]string{ + "versionIntroduced": "v0.90", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(2, 2, command, args) diff --git a/cmd/copyto/copyto.go b/cmd/copyto/copyto.go index 85b54fa60..337a80b3a 100644 --- a/cmd/copyto/copyto.go +++ b/cmd/copyto/copyto.go @@ -46,6 +46,9 @@ the destination. **Note**: Use the ` + "`-P`" + `/` + "`--progress`" + ` flag to view real-time transfer statistics `, + Annotations: map[string]string{ + "versionIntroduced": "v1.35", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(2, 2, command, args) fsrc, srcFileName, fdst, dstFileName := cmd.NewFsSrcDstFiles(args) diff --git a/cmd/copyurl/copyurl.go b/cmd/copyurl/copyurl.go index a3c079b11..9b9063861 100644 --- a/cmd/copyurl/copyurl.go +++ b/cmd/copyurl/copyurl.go @@ -51,6 +51,9 @@ destination if there is one with the same name. Setting ` + "`--stdout`" + ` or making the output file name ` + "`-`" + ` will cause the output to be written to standard output. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.43", + }, RunE: func(command *cobra.Command, args []string) (err error) { cmd.CheckArgs(1, 2, command, args) diff --git a/cmd/cryptcheck/cryptcheck.go b/cmd/cryptcheck/cryptcheck.go index aab50ef06..481c4cece 100644 --- a/cmd/cryptcheck/cryptcheck.go +++ b/cmd/cryptcheck/cryptcheck.go @@ -47,6 +47,9 @@ the files in remote:path. After it has run it will log the status of the encryptedremote:. ` + check.FlagsHelp, + Annotations: map[string]string{ + "versionIntroduced": "v1.36", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(2, 2, command, args) fsrc, fdst := cmd.NewFsSrcDst(args) diff --git a/cmd/cryptdecode/cryptdecode.go b/cmd/cryptdecode/cryptdecode.go index 9c6178e9e..a657bb0c5 100644 --- a/cmd/cryptdecode/cryptdecode.go +++ b/cmd/cryptdecode/cryptdecode.go @@ -41,6 +41,9 @@ use it like this Another way to accomplish this is by using the ` + "`rclone backend encode` (or `decode`)" + ` command. See the documentation on the [crypt](/crypt/) overlay for more info. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.38", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(2, 11, command, args) cmd.Run(false, false, command, func() error { diff --git a/cmd/dedupe/dedupe.go b/cmd/dedupe/dedupe.go index 94a136ca2..b56d62d9f 100644 --- a/cmd/dedupe/dedupe.go +++ b/cmd/dedupe/dedupe.go @@ -135,6 +135,9 @@ Or rclone dedupe rename "drive:Google Photos" `, + Annotations: map[string]string{ + "versionIntroduced": "v1.27", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 2, command, args) if len(args) > 1 { diff --git a/cmd/delete/delete.go b/cmd/delete/delete.go index 047c320af..4dcc69ddd 100644 --- a/cmd/delete/delete.go +++ b/cmd/delete/delete.go @@ -53,6 +53,9 @@ delete all files bigger than 100 MiB. **Important**: Since this can cause data loss, test first with the |--dry-run| or the |--interactive|/|-i| flag. `, "|", "`"), + Annotations: map[string]string{ + "versionIntroduced": "v1.27", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) diff --git a/cmd/deletefile/deletefile.go b/cmd/deletefile/deletefile.go index 9d222771d..4bf4ad72d 100644 --- a/cmd/deletefile/deletefile.go +++ b/cmd/deletefile/deletefile.go @@ -22,6 +22,9 @@ Remove a single file from remote. Unlike ` + "`" + `delete` + "`" + ` it cannot remove a directory and it doesn't obey include/exclude filters - if the specified file exists, it will always be removed. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.42", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fs, fileName := cmd.NewFsFile(args[0]) diff --git a/cmd/genautocomplete/genautocomplete.go b/cmd/genautocomplete/genautocomplete.go index 9502bbbc9..c1408d9f7 100644 --- a/cmd/genautocomplete/genautocomplete.go +++ b/cmd/genautocomplete/genautocomplete.go @@ -17,4 +17,7 @@ var completionDefinition = &cobra.Command{ Generates a shell completion script for rclone. Run with ` + "`--help`" + ` to list the supported shells. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.33", + }, } diff --git a/cmd/gendocs/gendocs.go b/cmd/gendocs/gendocs.go index 4c5417abc..83c54846d 100644 --- a/cmd/gendocs/gendocs.go +++ b/cmd/gendocs/gendocs.go @@ -53,6 +53,9 @@ var commandDefinition = &cobra.Command{ This produces markdown docs for the rclone commands to the directory supplied. These are in a format suitable for hugo to render into the rclone.org website.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.33", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(1, 1, command, args) now := time.Now().Format(time.RFC3339) diff --git a/cmd/hashsum/hashsum.go b/cmd/hashsum/hashsum.go index 4a1993716..6e39cf7ce 100644 --- a/cmd/hashsum/hashsum.go +++ b/cmd/hashsum/hashsum.go @@ -112,6 +112,9 @@ Then Note that hash names are case insensitive and values are output in lower case. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.41", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(0, 2, command, args) if len(args) == 0 { diff --git a/cmd/help.go b/cmd/help.go index ecc34b63e..949abe45b 100644 --- a/cmd/help.go +++ b/cmd/help.go @@ -33,6 +33,9 @@ See the home page (https://rclone.org/) for installation, usage, documentation, changelog and configuration walkthroughs. `, + Annotations: map[string]string{ + "versionIntroduced": "v0.90", + }, PersistentPostRun: func(cmd *cobra.Command, args []string) { fs.Debugf("rclone", "Version %q finishing with parameters %q", fs.Version, os.Args) atexit.Run() diff --git a/cmd/link/link.go b/cmd/link/link.go index a0356cd33..380e5a46b 100644 --- a/cmd/link/link.go +++ b/cmd/link/link.go @@ -49,6 +49,9 @@ link. Exact capabilities depend on the remote, but the link will always by default be created with the least constraints – e.g. no expiry, no password protection, accessible without account. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.41", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc, remote := cmd.NewFsFile(args[0]) diff --git a/cmd/listremotes/listremotes.go b/cmd/listremotes/listremotes.go index bf7b697f2..e473fcb21 100644 --- a/cmd/listremotes/listremotes.go +++ b/cmd/listremotes/listremotes.go @@ -30,6 +30,9 @@ rclone listremotes lists all the available remotes from the config file. When used with the ` + "`--long`" + ` flag it lists the types too. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.34", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 0, command, args) remotes := config.FileSections() diff --git a/cmd/ls/ls.go b/cmd/ls/ls.go index 334b12f8e..cecab52a0 100644 --- a/cmd/ls/ls.go +++ b/cmd/ls/ls.go @@ -31,6 +31,9 @@ Eg 37600 fubuwic ` + lshelp.Help, + Annotations: map[string]string{ + "versionIntroduced": "v0.90", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) diff --git a/cmd/lsd/lsd.go b/cmd/lsd/lsd.go index 8d79266fb..d6681bdad 100644 --- a/cmd/lsd/lsd.go +++ b/cmd/lsd/lsd.go @@ -49,6 +49,9 @@ Or If you just want the directory names use ` + "`rclone lsf --dirs-only`" + `. ` + lshelp.Help, + Annotations: map[string]string{ + "versionIntroduced": "v0.90", + }, Run: func(command *cobra.Command, args []string) { ci := fs.GetConfig(context.Background()) cmd.CheckArgs(1, 1, command, args) diff --git a/cmd/lsf/lsf.go b/cmd/lsf/lsf.go index 2651e90e7..8322e7c25 100644 --- a/cmd/lsf/lsf.go +++ b/cmd/lsf/lsf.go @@ -142,6 +142,9 @@ those only (without traversing the whole directory structure): rclone copy --files-from-raw new_files /path/to/local remote:path ` + lshelp.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.40", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) diff --git a/cmd/lsjson/lsjson.go b/cmd/lsjson/lsjson.go index a17ade327..c7da1c863 100644 --- a/cmd/lsjson/lsjson.go +++ b/cmd/lsjson/lsjson.go @@ -112,6 +112,9 @@ will be shown ("2017-05-31T16:15:57+01:00"). The whole output can be processed as a JSON blob, or alternatively it can be processed line by line as each item is written one to a line. ` + lshelp.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.37", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(1, 1, command, args) var fsrc fs.Fs diff --git a/cmd/lsl/lsl.go b/cmd/lsl/lsl.go index f8108c5f7..e7a7366f1 100644 --- a/cmd/lsl/lsl.go +++ b/cmd/lsl/lsl.go @@ -31,6 +31,9 @@ Eg 37600 2016-06-25 18:55:40.814629136 fubuwic ` + lshelp.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.02", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) diff --git a/cmd/md5sum/md5sum.go b/cmd/md5sum/md5sum.go index 91bc66e44..94c0ed3ef 100644 --- a/cmd/md5sum/md5sum.go +++ b/cmd/md5sum/md5sum.go @@ -38,6 +38,9 @@ by not passing a remote:path, or by passing a hyphen as remote:path when there is data to read (if not, the hyphen will be treated literally, as a relative path). `, + Annotations: map[string]string{ + "versionIntroduced": "v1.02", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(0, 1, command, args) if found, err := hashsum.CreateFromStdinArg(hash.MD5, args, 0); found { diff --git a/cmd/mkdir/mkdir.go b/cmd/mkdir/mkdir.go index 3c99180fe..92922ffd2 100644 --- a/cmd/mkdir/mkdir.go +++ b/cmd/mkdir/mkdir.go @@ -18,6 +18,9 @@ func init() { var commandDefinition = &cobra.Command{ Use: "mkdir remote:path", Short: `Make the path if it doesn't already exist.`, + Annotations: map[string]string{ + "versionIntroduced": "v0.90", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fdst := cmd.NewFsDir(args) diff --git a/cmd/mountlib/mount.go b/cmd/mountlib/mount.go index 907f16efd..af0eaf5a0 100644 --- a/cmd/mountlib/mount.go +++ b/cmd/mountlib/mount.go @@ -157,6 +157,9 @@ func NewMountCommand(commandName string, hidden bool, mount MountFn) *cobra.Comm Hidden: hidden, Short: `Mount the remote as file system on a mountpoint.`, Long: strings.ReplaceAll(strings.ReplaceAll(mountHelp, "|", "`"), "@", commandName) + vfs.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.33", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(2, 2, command, args) diff --git a/cmd/move/move.go b/cmd/move/move.go index 65c8adc23..fd1004db1 100644 --- a/cmd/move/move.go +++ b/cmd/move/move.go @@ -60,6 +60,9 @@ can speed transfers up greatly. **Note**: Use the |-P|/|--progress| flag to view real-time transfer statistics. `, "|", "`"), + Annotations: map[string]string{ + "versionIntroduced": "v1.19", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(2, 2, command, args) fsrc, srcFileName, fdst := cmd.NewFsSrcFileDst(args) diff --git a/cmd/moveto/moveto.go b/cmd/moveto/moveto.go index 698d7ee18..f007fb182 100644 --- a/cmd/moveto/moveto.go +++ b/cmd/moveto/moveto.go @@ -49,6 +49,9 @@ successful transfer. **Note**: Use the ` + "`-P`" + `/` + "`--progress`" + ` flag to view real-time transfer statistics. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.35", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(2, 2, command, args) fsrc, srcFileName, fdst, dstFileName := cmd.NewFsSrcDstFiles(args) diff --git a/cmd/ncdu/ncdu.go b/cmd/ncdu/ncdu.go index f6de22f1a..6fdb210a5 100644 --- a/cmd/ncdu/ncdu.go +++ b/cmd/ncdu/ncdu.go @@ -74,6 +74,9 @@ For a non-interactive listing of the remote, see the [tree](/commands/rclone_tree/) command. To just get the total size of the remote you can also use the [size](/commands/rclone_size/) command. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.37", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) diff --git a/cmd/obscure/obscure.go b/cmd/obscure/obscure.go index 08cf8a06a..80a473ae2 100644 --- a/cmd/obscure/obscure.go +++ b/cmd/obscure/obscure.go @@ -42,6 +42,9 @@ obfuscating the hyphen itself. If you want to encrypt the config file then please use config file encryption - see [rclone config](/commands/rclone_config/) for more info.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.36", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(1, 1, command, args) var password string diff --git a/cmd/purge/purge.go b/cmd/purge/purge.go index d41e22cf6..59085f83e 100644 --- a/cmd/purge/purge.go +++ b/cmd/purge/purge.go @@ -26,6 +26,9 @@ delete files. To delete empty directories only, use command **Important**: Since this can cause data loss, test first with the ` + "`--dry-run` or the `--interactive`/`-i`" + ` flag. `, + Annotations: map[string]string{ + "versionIntroduced": "v0.90", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fdst := cmd.NewFsDir(args) diff --git a/cmd/rc/rc.go b/cmd/rc/rc.go index 2bb163d03..b31e340eb 100644 --- a/cmd/rc/rc.go +++ b/cmd/rc/rc.go @@ -99,6 +99,9 @@ rclone rc server, e.g.: rclone rc --loopback operations/about fs=/ Use ` + "`rclone rc`" + ` to see a list of all possible commands.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.40", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 1e9, command, args) cmd.Run(false, false, command, func() error { diff --git a/cmd/rcat/rcat.go b/cmd/rcat/rcat.go index 4328a8aa8..c66fe4650 100644 --- a/cmd/rcat/rcat.go +++ b/cmd/rcat/rcat.go @@ -56,6 +56,9 @@ Note that the upload can also not be retried because the data is not kept around until the upload succeeds. If you need to transfer a lot of data, you're better off caching locally and then ` + "`rclone move`" + ` it to the destination.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.38", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) diff --git a/cmd/rcd/rcd.go b/cmd/rcd/rcd.go index 940c300a6..aaa57a065 100644 --- a/cmd/rcd/rcd.go +++ b/cmd/rcd/rcd.go @@ -32,6 +32,9 @@ the browser when rclone is run. See the [rc documentation](/rc/) for more info on the rc flags. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.45", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 1, command, args) if rcflags.Opt.Enabled { diff --git a/cmd/reveal/reveal.go b/cmd/reveal/reveal.go index e569a26b4..0839941bd 100644 --- a/cmd/reveal/reveal.go +++ b/cmd/reveal/reveal.go @@ -16,6 +16,9 @@ func init() { var commandDefinition = &cobra.Command{ Use: "reveal password", Short: `Reveal obscured password from rclone.conf`, + Annotations: map[string]string{ + "versionIntroduced": "v1.43", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) cmd.Run(false, false, command, func() error { diff --git a/cmd/rmdir/rmdir.go b/cmd/rmdir/rmdir.go index 778315be8..20fef8314 100644 --- a/cmd/rmdir/rmdir.go +++ b/cmd/rmdir/rmdir.go @@ -24,6 +24,9 @@ with option ` + "`--rmdirs`" + `) to do that. To delete a path and any objects in it, use [purge](/commands/rclone_purge/) command. `, + Annotations: map[string]string{ + "versionIntroduced": "v0.90", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fdst := cmd.NewFsDir(args) diff --git a/cmd/rmdirs/rmdirs.go b/cmd/rmdirs/rmdirs.go index 11a09ca20..62711dea4 100644 --- a/cmd/rmdirs/rmdirs.go +++ b/cmd/rmdirs/rmdirs.go @@ -38,6 +38,9 @@ used with option ` + "`--rmdirs`" + `). To delete a path and any objects in it, use [purge](/commands/rclone_purge/) command. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.35", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fdst := cmd.NewFsDir(args) diff --git a/cmd/selfupdate/selfupdate.go b/cmd/selfupdate/selfupdate.go index c7f1a3cda..d045fede0 100644 --- a/cmd/selfupdate/selfupdate.go +++ b/cmd/selfupdate/selfupdate.go @@ -64,6 +64,9 @@ var cmdSelfUpdate = &cobra.Command{ Aliases: []string{"self-update"}, Short: `Update the rclone binary.`, Long: strings.ReplaceAll(selfUpdateHelp, "|", "`"), + Annotations: map[string]string{ + "versionIntroduced": "v1.55", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 0, command, args) if Opt.Package == "" { diff --git a/cmd/serve/dlna/dlna.go b/cmd/serve/dlna/dlna.go index 579d695d8..2389ce638 100644 --- a/cmd/serve/dlna/dlna.go +++ b/cmd/serve/dlna/dlna.go @@ -47,6 +47,9 @@ media transcoding support. This means that some players might show files that they are not able to play back correctly. ` + dlnaflags.Help + vfs.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.46", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) f := cmd.NewFsSrc(args) diff --git a/cmd/serve/docker/docker.go b/cmd/serve/docker/docker.go index 5e4971801..d16055865 100644 --- a/cmd/serve/docker/docker.go +++ b/cmd/serve/docker/docker.go @@ -48,7 +48,9 @@ var Command = &cobra.Command{ Use: "docker", Short: `Serve any remote on docker's volume plugin API.`, Long: strings.ReplaceAll(longHelp, "|", "`") + vfs.Help, - + Annotations: map[string]string{ + "versionIntroduced": "v1.56", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 0, command, args) cmd.Run(false, false, command, func() error { diff --git a/cmd/serve/ftp/ftp.go b/cmd/serve/ftp/ftp.go index 2023ba851..28bd4325f 100644 --- a/cmd/serve/ftp/ftp.go +++ b/cmd/serve/ftp/ftp.go @@ -99,6 +99,9 @@ By default this will serve files without needing a login. You can set a single username and password with the --user and --pass flags. ` + vfs.Help + proxy.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.44", + }, Run: func(command *cobra.Command, args []string) { var f fs.Fs if proxyflags.Opt.AuthProxy == "" { diff --git a/cmd/serve/http/http.go b/cmd/serve/http/http.go index cdf8afd28..5db094dce 100644 --- a/cmd/serve/http/http.go +++ b/cmd/serve/http/http.go @@ -60,6 +60,9 @@ The server will log errors. Use ` + "`-v`" + ` to see access logs. ` + "`--bwlimit`" + ` will be respected for file transfers. Use ` + "`--stats`" + ` to control the stats printing. ` + httplib.Help + data.Help + auth.Help + vfs.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) f := cmd.NewFsSrc(args) diff --git a/cmd/serve/restic/restic.go b/cmd/serve/restic/restic.go index 7dfed0e1e..4aaad2a3a 100644 --- a/cmd/serve/restic/restic.go +++ b/cmd/serve/restic/restic.go @@ -128,6 +128,9 @@ these **must** end with /. Eg The` + "`--private-repos`" + ` flag can be used to limit users to repositories starting with a path of ` + "`//`" + `. ` + httplib.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.40", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) f := cmd.NewFsSrc(args) diff --git a/cmd/serve/serve.go b/cmd/serve/serve.go index f79162c82..8f523f52c 100644 --- a/cmd/serve/serve.go +++ b/cmd/serve/serve.go @@ -49,6 +49,9 @@ subcommand to specify the protocol, e.g. Each subcommand has its own options which you can see in their help. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, RunE: func(command *cobra.Command, args []string) error { if len(args) == 0 { return errors.New("serve requires a protocol, e.g. 'rclone serve http remote:'") diff --git a/cmd/serve/sftp/sftp.go b/cmd/serve/sftp/sftp.go index 8244435ee..2a255224b 100644 --- a/cmd/serve/sftp/sftp.go +++ b/cmd/serve/sftp/sftp.go @@ -114,6 +114,9 @@ checksumming is possible but less secure and you could use the SFTP server provided by OpenSSH in this case. ` + vfs.Help + proxy.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.48", + }, Run: func(command *cobra.Command, args []string) { var f fs.Fs if proxyflags.Opt.AuthProxy == "" { diff --git a/cmd/serve/webdav/webdav.go b/cmd/serve/webdav/webdav.go index bfd0eda31..5ab881019 100644 --- a/cmd/serve/webdav/webdav.go +++ b/cmd/serve/webdav/webdav.go @@ -61,6 +61,9 @@ supported hash on the backend or you can use a named hash such as to see the full list. ` + httplib.Help + vfs.Help + proxy.Help, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, RunE: func(command *cobra.Command, args []string) error { var f fs.Fs if proxyflags.Opt.AuthProxy == "" { diff --git a/cmd/settier/settier.go b/cmd/settier/settier.go index 8a1d234f0..d918ebdd0 100644 --- a/cmd/settier/settier.go +++ b/cmd/settier/settier.go @@ -40,6 +40,9 @@ Or just provide remote directory and all files in directory will be tiered rclone settier tier remote:path/dir `, + Annotations: map[string]string{ + "versionIntroduced": "v1.44", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(2, 2, command, args) tier := args[0] diff --git a/cmd/sha1sum/sha1sum.go b/cmd/sha1sum/sha1sum.go index 053ca0cbb..483832ec2 100644 --- a/cmd/sha1sum/sha1sum.go +++ b/cmd/sha1sum/sha1sum.go @@ -41,6 +41,9 @@ as a relative path). This command can also hash data received on STDIN, if not passing a remote:path. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.27", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(0, 1, command, args) if found, err := hashsum.CreateFromStdinArg(hash.SHA1, args, 0); found { diff --git a/cmd/size/size.go b/cmd/size/size.go index c084de527..8be130529 100644 --- a/cmd/size/size.go +++ b/cmd/size/size.go @@ -44,6 +44,9 @@ Rclone will then show a notice in the log indicating how many such files were encountered, and count them in as empty files in the output of the size command. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.23", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) diff --git a/cmd/sync/sync.go b/cmd/sync/sync.go index 33a5b0027..e9c91f2c9 100644 --- a/cmd/sync/sync.go +++ b/cmd/sync/sync.go @@ -60,6 +60,9 @@ destination that is inside the source directory. **Note**: Use the ` + "`rclone dedupe`" + ` command to deal with "Duplicate object/directory found in source/destination - ignoring" errors. See [this forum post](https://forum.rclone.org/t/sync-not-clearing-duplicates/14372) for more info. `, + Annotations: map[string]string{ + "versionIntroduced": "v0.90", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(2, 2, command, args) fsrc, srcFileName, fdst := cmd.NewFsSrcFileDst(args) diff --git a/cmd/test/changenotify/changenotify.go b/cmd/test/changenotify/changenotify.go index 70eab98f3..6b88e5f11 100644 --- a/cmd/test/changenotify/changenotify.go +++ b/cmd/test/changenotify/changenotify.go @@ -26,6 +26,9 @@ func init() { var commandDefinition = &cobra.Command{ Use: "changenotify remote:", Short: `Log any change notify requests for the remote passed in.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.56", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(1, 1, command, args) f := cmd.NewFsSrc(args) diff --git a/cmd/test/histogram/histogram.go b/cmd/test/histogram/histogram.go index a3a2865b8..f2044fa69 100644 --- a/cmd/test/histogram/histogram.go +++ b/cmd/test/histogram/histogram.go @@ -28,6 +28,9 @@ in filenames in the remote:path specified. The data doesn't contain any identifying information but is useful for the rclone developers when developing filename compression. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.55", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) f := cmd.NewFsDir(args) diff --git a/cmd/test/info/info.go b/cmd/test/info/info.go index 89cc10a01..071554796 100644 --- a/cmd/test/info/info.go +++ b/cmd/test/info/info.go @@ -66,6 +66,9 @@ a bit of go code for each one. **NB** this can create undeletable files and other hazards - use with care `, + Annotations: map[string]string{ + "versionIntroduced": "v1.55", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1e6, command, args) if !checkNormalization && !checkControl && !checkLength && !checkStreaming && !all { diff --git a/cmd/test/makefiles/makefiles.go b/cmd/test/makefiles/makefiles.go index b778accd0..7b0ac57a8 100644 --- a/cmd/test/makefiles/makefiles.go +++ b/cmd/test/makefiles/makefiles.go @@ -74,6 +74,9 @@ func init() { var makefilesCmd = &cobra.Command{ Use: "makefiles ", Short: `Make a random file hierarchy in a directory`, + Annotations: map[string]string{ + "versionIntroduced": "v1.55", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) commonInit() @@ -105,6 +108,9 @@ var makefilesCmd = &cobra.Command{ var makefileCmd = &cobra.Command{ Use: "makefile []+ [flags]", Short: `Make files with random contents of the size given`, + Annotations: map[string]string{ + "versionIntroduced": "v1.59", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1e6, command, args) commonInit() diff --git a/cmd/test/memory/memory.go b/cmd/test/memory/memory.go index 38b7b1683..432110881 100644 --- a/cmd/test/memory/memory.go +++ b/cmd/test/memory/memory.go @@ -20,6 +20,9 @@ func init() { var commandDefinition = &cobra.Command{ Use: "memory remote:path", Short: `Load all the objects at remote:path into memory and report memory stats.`, + Annotations: map[string]string{ + "versionIntroduced": "v1.55", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) diff --git a/cmd/test/test.go b/cmd/test/test.go index 774bf6c3a..8888f85c6 100644 --- a/cmd/test/test.go +++ b/cmd/test/test.go @@ -25,4 +25,7 @@ Each subcommand has its own options which you can see in their help. **NB** Be careful running these commands, they may do strange things so reading their documentation first is recommended. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.55", + }, } diff --git a/cmd/touch/touch.go b/cmd/touch/touch.go index b0bea31b2..7ec4a0980 100644 --- a/cmd/touch/touch.go +++ b/cmd/touch/touch.go @@ -64,6 +64,9 @@ time instead of the current time. Times may be specified as one of: Note that value of ` + "`--timestamp`" + ` is in UTC. If you want local time then add the ` + "`--localtime`" + ` flag. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.39", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(1, 1, command, args) f, remote := newFsDst(args) diff --git a/cmd/tree/tree.go b/cmd/tree/tree.go index 5705dcec8..ae776b067 100644 --- a/cmd/tree/tree.go +++ b/cmd/tree/tree.go @@ -95,6 +95,9 @@ short options as they conflict with rclone's short options. For a more interactive navigation of the remote see the [ncdu](/commands/rclone_ncdu/) command. `, + Annotations: map[string]string{ + "versionIntroduced": "v1.38", + }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(1, 1, command, args) fsrc := cmd.NewFsSrc(args) diff --git a/cmd/version/version.go b/cmd/version/version.go index 32416f89a..5d35cb98c 100644 --- a/cmd/version/version.go +++ b/cmd/version/version.go @@ -67,6 +67,9 @@ Or upgrade: https://beta.rclone.org/v1.42-005-g56e1e820 `, + Annotations: map[string]string{ + "versionIntroduced": "v1.33", + }, Run: func(command *cobra.Command, args []string) { cmd.CheckArgs(0, 0, command, args) if check {