Autocomplete (for Bash at least) does not escape spaces

This is not high priority by any means but I think it is work understanding.

What is the problem you are having with rclone?

The (bash) autocomplete does not escape spaces when it tries to tab complete

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

rclone v1.57.0
- os/version: darwin 10.15.7 (64 bit)
- os/kernel: 19.6.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: cmount

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

Tested with local (via alias to include a real remote) and OneDrive

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

$ rclone lsf onedrive:Documents/Offi<TAB>
$ rclone lsf onedrive:Documents/Office Lens/

Where you notice Office Lens is not escaped as it would be if a local dir.

The rclone config contents with secrets removed.

type = alias
remote = /Users/USER/testdir/

type = onedrive
token = {"access_token":"REDACTED","expiry":"2022-01-29T13:19:49.798019-07:00"}
drive_id = REDACTED
drive_type = personal
client_id = REDACTED
client_secret = REDACTED

A log from the command with the -vv flag


I don't know how to get a debug log of the bash autocomplete. Let me know and I'll update

That works fine for me on Linux. Maybe just a MacOS thing?

No, me neither!

What version of bash are you using? Can you try a later version?

Interesting. I just pulled up my VPS (GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu)) and it also works.

Good question. I guess it is the default macOS one. It appears to be very old: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)

Yeah, I'll try to install the homebrew latests. I'll followup up (and hopefully not break everything....)

@ncw , @Animosity022:

Thanks for the suggestions. Upgrading my mac to GNU bash, version 5.1.16(1)-release (x86_64-apple-darwin19.6.0) fixes it.

Thoughts on (me) adding a note in the relevant docs that the autocomplete may not work reliably for older versions of the respective shells? Not a big deal either way.

Is it an older mac? I thought they switched over to zsh an OS or two back.

It is a 2020 Intel MacBook Pro. They did switch to ZSH but I kept it at bash to match the other computers I used regularly, including air-gapped ones that couldn't have ZSH if I wanted. (nor rclone for that matter)

Perhaps mention the bash version? Seems like a good idea.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.