Rclone sync exclude and shell escapes

I think I finally figured out what was an error on my part to do with shell escapes under Linux wrt using exclude on a sync. And, silly me, I should have know this.

I would suggest the docs be made a little more explicit. For example in the docs https://rclone.org/filtering/

Quoting shell metacharacters

The examples above may not work verbatim in your shell as they have shell metacharacters in them (eg  `*` ), and may require quoting.

Eg linux, OSX

* `--include \*.jpg`
* `--include '*.jpg'`
* `--include='*.jpg'`

I use bash and used double quotes around my exclusion filter (which included a **) which wreaked haovc for a while.

So, the docs above are correct, but I would suggest a sentence be explicitly added that for bash (and probably other/all Linux shells) using single-quotes is a must as double quotes will expand. Maybe in bold too so people like me will read it :slight_smile:

As always, thank you for so much work on rclone, it is an amazing piece of software.

You could be safe to use ** in double quotes.

The characters which won't work in double quotes are {} - did you have those?

If you wanted to propose a fix, its really easy using GitHub's online docs editor - see here: https://github.com/rclone/rclone/blob/master/CONTRIBUTING.md#writing-documentation

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