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

docs: change syntax hightlighting for command examples from sh to console

This commit is contained in:
albertony
2025-10-31 21:58:24 +01:00
parent becc068d36
commit 059ad47336
110 changed files with 782 additions and 750 deletions

View File

@@ -34,7 +34,7 @@ authentication. Bcrypt is recommended.
To create an htpasswd file:
` + "```sh" + `
` + "```console" + `
touch htpasswd
htpasswd -B htpasswd user
htpasswd -B htpasswd anotherUser

View File

@@ -90,7 +90,7 @@ It can be configured with .socket and .service unit files as described in
Socket activation can be tested ad-hoc with the ` + "`systemd-socket-activate`" + `command
` + "```sh" + `
` + "```console" + `
systemd-socket-activate -l 8000 -- rclone serve
` + "```" + `

View File

@@ -97,7 +97,7 @@ func (e example) output() string {
func sprintExamples() string {
s := "Examples:\n"
for _, e := range examples {
s += fmt.Sprintf("\n```sh\n%s\n", e.command())
s += fmt.Sprintf("\n```console\n%s\n", e.command())
s += fmt.Sprintf("// Output: %s\n```\n", e.output())
}
return s

View File

@@ -151,82 +151,82 @@ SquareBracket
Examples:
```sh
rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,uppercase"
// Output: STORIES/THE QUICK BROWN FOX!.TXT
```console
$ rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,uppercase"
STORIES/THE QUICK BROWN FOX!.TXT
```
```sh
rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,replace=Fox:Turtle" --name-transform "all,replace=Quick:Slow"
// Output: stories/The Slow Brown Turtle!.txt
```console
$ rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,replace=Fox:Turtle" --name-transform "all,replace=Quick:Slow"
stories/The Slow Brown Turtle!.txt
```
```sh
rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,base64encode"
// Output: c3Rvcmllcw==/VGhlIFF1aWNrIEJyb3duIEZveCEudHh0
```console
$ rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,base64encode"
c3Rvcmllcw==/VGhlIFF1aWNrIEJyb3duIEZveCEudHh0
```
```sh
rclone convmv "c3Rvcmllcw==/VGhlIFF1aWNrIEJyb3duIEZveCEudHh0" --name-transform "all,base64decode"
// Output: stories/The Quick Brown Fox!.txt
```console
$ rclone convmv "c3Rvcmllcw==/VGhlIFF1aWNrIEJyb3duIEZveCEudHh0" --name-transform "all,base64decode"
stories/The Quick Brown Fox!.txt
```
```sh
rclone convmv "stories/The Quick Brown 🦊 Fox Went to the Café!.txt" --name-transform "all,nfc"
// Output: stories/The Quick Brown 🦊 Fox Went to the Café!.txt
```console
$ rclone convmv "stories/The Quick Brown 🦊 Fox Went to the Café!.txt" --name-transform "all,nfc"
stories/The Quick Brown 🦊 Fox Went to the Café!.txt
```
```sh
rclone convmv "stories/The Quick Brown 🦊 Fox Went to the Café!.txt" --name-transform "all,nfd"
// Output: stories/The Quick Brown 🦊 Fox Went to the Café!.txt
```console
$ rclone convmv "stories/The Quick Brown 🦊 Fox Went to the Café!.txt" --name-transform "all,nfd"
stories/The Quick Brown 🦊 Fox Went to the Café!.txt
```
```sh
rclone convmv "stories/The Quick Brown 🦊 Fox!.txt" --name-transform "all,ascii"
// Output: stories/The Quick Brown Fox!.txt
```console
$ rclone convmv "stories/The Quick Brown 🦊 Fox!.txt" --name-transform "all,ascii"
stories/The Quick Brown Fox!.txt
```
```sh
rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,trimsuffix=.txt"
// Output: stories/The Quick Brown Fox!
```console
$ rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,trimsuffix=.txt"
stories/The Quick Brown Fox!
```
```sh
rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,prefix=OLD_"
// Output: OLD_stories/OLD_The Quick Brown Fox!.txt
```console
$ rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,prefix=OLD_"
OLD_stories/OLD_The Quick Brown Fox!.txt
```
```sh
rclone convmv "stories/The Quick Brown 🦊 Fox Went to the Café!.txt" --name-transform "all,charmap=ISO-8859-7"
// Output: stories/The Quick Brown _ Fox Went to the Caf_!.txt
```console
$ rclone convmv "stories/The Quick Brown 🦊 Fox Went to the Café!.txt" --name-transform "all,charmap=ISO-8859-7"
stories/The Quick Brown _ Fox Went to the Caf_!.txt
```
```sh
rclone convmv "stories/The Quick Brown Fox: A Memoir [draft].txt" --name-transform "all,encoder=Colon,SquareBracket"
// Output: stories/The Quick Brown Fox A Memoir draft.txt
```console
$ rclone convmv "stories/The Quick Brown Fox: A Memoir [draft].txt" --name-transform "all,encoder=Colon,SquareBracket"
stories/The Quick Brown Fox A Memoir draft.txt
```
```sh
rclone convmv "stories/The Quick Brown 🦊 Fox Went to the Café!.txt" --name-transform "all,truncate=21"
// Output: stories/The Quick Brown 🦊 Fox
```console
$ rclone convmv "stories/The Quick Brown 🦊 Fox Went to the Café!.txt" --name-transform "all,truncate=21"
stories/The Quick Brown 🦊 Fox
```
```sh
rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,command=echo"
// Output: stories/The Quick Brown Fox!.txt
```console
$ rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,command=echo"
stories/The Quick Brown Fox!.txt
```
```sh
rclone convmv "stories/The Quick Brown Fox!" --name-transform "date=-{YYYYMMDD}"
// Output: stories/The Quick Brown Fox!-20250830
```console
$ rclone convmv "stories/The Quick Brown Fox!" --name-transform "date=-{YYYYMMDD}"
stories/The Quick Brown Fox!-20250830
```
```sh
rclone convmv "stories/The Quick Brown Fox!" --name-transform "date=-{macfriendlytime}"
// Output: stories/The Quick Brown Fox!-2025-08-30 1234AM
```console
$ rclone convmv "stories/The Quick Brown Fox!" --name-transform "date=-{macfriendlytime}"
stories/The Quick Brown Fox!-2025-08-30 1234AM
```
```sh
rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,regex=[\\.\\w]/ab"
// Output: ababababababab/ababab ababababab ababababab ababab!abababab
```console
$ rclone convmv "stories/The Quick Brown Fox!.txt" --name-transform "all,regex=[\\.\\w]/ab"
ababababababab/ababab ababababab ababababab ababab!abababab
```