mirror of
https://github.com/rclone/rclone.git
synced 2025-12-27 05:33:17 +00:00
docs: fix markdown lint issues in command docs
This commit is contained in:
@@ -14,8 +14,7 @@ var completionDefinition = &cobra.Command{
|
||||
Use: "completion [shell]",
|
||||
Short: `Output completion script for a given shell.`,
|
||||
Long: `Generates a shell completion script for rclone.
|
||||
Run with ` + "`--help`" + ` to list the supported shells.
|
||||
`,
|
||||
Run with ` + "`--help`" + ` to list the supported shells.`,
|
||||
Annotations: map[string]string{
|
||||
"versionIntroduced": "v1.33",
|
||||
},
|
||||
|
||||
@@ -18,17 +18,21 @@ var bashCommandDefinition = &cobra.Command{
|
||||
Short: `Output bash completion script for rclone.`,
|
||||
Long: `Generates a bash shell autocompletion script for rclone.
|
||||
|
||||
By default, when run without any arguments,
|
||||
By default, when run without any arguments,
|
||||
|
||||
rclone completion bash
|
||||
` + "```sh" + `
|
||||
rclone completion bash
|
||||
` + "```" + `
|
||||
|
||||
the generated script will be written to
|
||||
|
||||
/etc/bash_completion.d/rclone
|
||||
` + "```sh" + `
|
||||
/etc/bash_completion.d/rclone
|
||||
` + "```" + `
|
||||
|
||||
and so rclone will probably need to be run as root, or with sudo.
|
||||
|
||||
If you supply a path to a file as the command line argument, then
|
||||
If you supply a path to a file as the command line argument, then
|
||||
the generated script will be written to that file, in which case
|
||||
you should not need root privileges.
|
||||
|
||||
@@ -39,11 +43,12 @@ can logout and login again to use the autocompletion script.
|
||||
|
||||
Alternatively, you can source the script directly
|
||||
|
||||
. /path/to/my_bash_completion_scripts/rclone
|
||||
` + "```sh" + `
|
||||
. /path/to/my_bash_completion_scripts/rclone
|
||||
` + "```" + `
|
||||
|
||||
and the autocompletion functionality will be added to your
|
||||
current shell.
|
||||
`,
|
||||
current shell.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(0, 1, command, args)
|
||||
out := "/etc/bash_completion.d/rclone"
|
||||
|
||||
@@ -21,18 +21,21 @@ var fishCommandDefinition = &cobra.Command{
|
||||
This writes to /etc/fish/completions/rclone.fish by default so will
|
||||
probably need to be run with sudo or as root, e.g.
|
||||
|
||||
sudo rclone completion fish
|
||||
` + "```sh" + `
|
||||
sudo rclone completion fish
|
||||
` + "```" + `
|
||||
|
||||
Logout and login again to use the autocompletion scripts, or source
|
||||
them directly
|
||||
|
||||
. /etc/fish/completions/rclone.fish
|
||||
` + "```sh" + `
|
||||
. /etc/fish/completions/rclone.fish
|
||||
` + "```" + `
|
||||
|
||||
If you supply a command line argument the script will be written
|
||||
there.
|
||||
|
||||
If output_file is "-", then the output will be written to stdout.
|
||||
`,
|
||||
If output_file is "-", then the output will be written to stdout.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(0, 1, command, args)
|
||||
out := "/etc/fish/completions/rclone.fish"
|
||||
|
||||
@@ -20,13 +20,14 @@ var powershellCommandDefinition = &cobra.Command{
|
||||
|
||||
To load completions in your current shell session:
|
||||
|
||||
rclone completion powershell | Out-String | Invoke-Expression
|
||||
` + "```sh" + `
|
||||
rclone completion powershell | Out-String | Invoke-Expression
|
||||
` + "```" + `
|
||||
|
||||
To load completions for every new session, add the output of the above command
|
||||
to your powershell profile.
|
||||
|
||||
If output_file is "-" or missing, then the output will be written to stdout.
|
||||
`,
|
||||
If output_file is "-" or missing, then the output will be written to stdout.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(0, 1, command, args)
|
||||
if len(args) == 0 || (len(args) > 0 && args[0] == "-") {
|
||||
|
||||
@@ -21,18 +21,21 @@ var zshCommandDefinition = &cobra.Command{
|
||||
This writes to /usr/share/zsh/vendor-completions/_rclone by default so will
|
||||
probably need to be run with sudo or as root, e.g.
|
||||
|
||||
sudo rclone completion zsh
|
||||
` + "```sh" + `
|
||||
sudo rclone completion zsh
|
||||
` + "```" + `
|
||||
|
||||
Logout and login again to use the autocompletion scripts, or source
|
||||
them directly
|
||||
|
||||
autoload -U compinit && compinit
|
||||
` + "```sh" + `
|
||||
autoload -U compinit && compinit
|
||||
` + "```" + `
|
||||
|
||||
If you supply a command line argument the script will be written
|
||||
there.
|
||||
|
||||
If output_file is "-", then the output will be written to stdout.
|
||||
`,
|
||||
If output_file is "-", then the output will be written to stdout.`,
|
||||
Run: func(command *cobra.Command, args []string) {
|
||||
cmd.CheckArgs(0, 1, command, args)
|
||||
out := "/usr/share/zsh/vendor-completions/_rclone"
|
||||
|
||||
Reference in New Issue
Block a user