1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

docs: fix markup of arguments #4276

Command line arguments have to be marked as code.
This commit is contained in:
Martin Michlmayr
2020-05-25 15:50:20 +08:00
committed by Ivan Andreev
parent 35b2ca642c
commit cd075f1703
8 changed files with 144 additions and 122 deletions

View File

@@ -2,6 +2,7 @@ package delete
import (
"context"
"strings"
"github.com/rclone/rclone/cmd"
"github.com/rclone/rclone/fs/config/flags"
@@ -22,16 +23,17 @@ func init() {
var commandDefinition = &cobra.Command{
Use: "delete remote:path",
Short: `Remove the files in path.`,
Long: `
Remove the files in path. Unlike ` + "`" + `purge` + "`" + ` it obeys include/exclude
// Warning! "|" will be replaced by backticks below
Long: strings.ReplaceAll(`
Remove the files in path. Unlike |purge| it obeys include/exclude
filters so can be used to selectively delete files.
` + "`rclone delete`" + ` only deletes files but leaves the directory structure
|rclone delete| only deletes files but leaves the directory structure
alone. If you want to delete a directory and all of its contents use
the ` + "`purge`" + ` command.
the |purge| command.
If you supply the --rmdirs flag, it will remove all empty directories along with it.
You can also use the separate command ` + "`rmdir`" + ` or ` + "`rmdirs`" + ` to
If you supply the |--rmdirs| flag, it will remove all empty directories along with it.
You can also use the separate command |rmdir| or |rmdirs| to
delete empty directories only.
For example, to delete all files bigger than 100MBytes, you may first want to check what
@@ -48,8 +50,8 @@ That reads "delete everything with a minimum size of 100 MB", hence
delete all files bigger than 100MBytes.
**Important**: Since this can cause data loss, test first with the
` + "`--dry-run` or the `--interactive`/`-i`" + ` flag.
`,
|--dry-run| or the |--interactive|/|-i| flag.
`, "|", "`"),
Run: func(command *cobra.Command, args []string) {
cmd.CheckArgs(1, 1, command, args)
fsrc := cmd.NewFsSrc(args)