mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 08:23:47 +01:00
genautocomplete: remove Ubuntu-ism from docs and clarify non-root use
This commit is contained in:
parent
205745313d
commit
d459fb0cb8
@ -18,20 +18,31 @@ var bashCommandDefinition = &cobra.Command{
|
|||||||
Long: `
|
Long: `
|
||||||
Generates a bash shell autocompletion script for rclone.
|
Generates a bash shell autocompletion script for rclone.
|
||||||
|
|
||||||
This writes to /etc/bash_completion.d/rclone by default so will
|
By default, when run without any arguments,
|
||||||
probably need to be run with sudo or as root, e.g.
|
|
||||||
|
|
||||||
sudo rclone genautocomplete bash
|
rclone genautocomplete bash
|
||||||
|
|
||||||
Logout and login again to use the autocompletion scripts, or source
|
the generated script will be written to
|
||||||
them directly
|
|
||||||
|
|
||||||
. /etc/bash_completion
|
/etc/bash_completion.d/rclone
|
||||||
|
|
||||||
If you supply a command line argument the script will be written
|
and so rclone will probably need to be run as root, or with sudo.
|
||||||
there.
|
|
||||||
|
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.
|
||||||
|
|
||||||
If output_file is "-", then the output will be written to stdout.
|
If output_file is "-", then the output will be written to stdout.
|
||||||
|
|
||||||
|
If you have installed the script into the default location, you
|
||||||
|
can logout and login again to use the autocompletion script.
|
||||||
|
|
||||||
|
Alternatively, you can source the script directly
|
||||||
|
|
||||||
|
. /path/to/my_bash_completion_scripts/rclone
|
||||||
|
|
||||||
|
and the autocompletion functionality will be added to your
|
||||||
|
current shell.
|
||||||
`,
|
`,
|
||||||
Run: func(command *cobra.Command, args []string) {
|
Run: func(command *cobra.Command, args []string) {
|
||||||
cmd.CheckArgs(0, 1, command, args)
|
cmd.CheckArgs(0, 1, command, args)
|
||||||
|
Loading…
Reference in New Issue
Block a user