Remote path autocompletion does not work if path is prefixed with quote

What is the problem you are having with rclone?

Remote path autocompletion does not work if path is prefixed with single (') or double (") quotation mark. This is an issue if I want to autocomplete part of the path, but want to paste the other part - pasting only really works if its in quotes, as the paste path won't be escaped.

Run the command 'rclone version' and share the full output of the command.

rclone v1.61.1
- os/version: linuxmint 20.3 (64 bit)
- os/kernel: 5.4.0-139-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.19.4
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy --progress myremote:"StartOfFolderName

The rclone config contents with secrets removed.

N/A

A log from the command with the -vv flag

N/A

I don't know whether this is rclone's bug or whether it is a bug in cobra which is the library rclone uses for this.

Can you do some more investigation?

1 Like

It seems to work with local paths for rclone and for the github CLI tool, which also uses cobra. It works for rclone with its commands as well, but not for github CLI. So I think this could be an implementation issue, rather than an issue with cobra?

The only bit of customization that rclone does to the cobra completion scripts is here

So if there is a bug in rclone, its in there!

However that was written by a bash wizard not by me and I have very little idea how it works.

Take a look and if you have any ideas let me know, otherwise open a new issue on Github and I'll tag our bash wizard and maybe they can help.

I'm afraid I'm not a bash wizard either, so I'll open an issue. Thanks.

1 Like

Made the issue: Remote path autocompletion does not work if path is prefixed with quote · Issue #6798 · rclone/rclone · GitHub