Dave, I had no idea scp would do brace expansion on the server side. That's quite unexpected, and quite the discovery!

I tried it with rsync, and rsync *also* supports it. That made me suspicious.

As I feared, it seems to mean it runs the server side of rsync (and of scp) through the shell. Testing confirms it. If I want to (explicitly) copy files with spaces in the names, the quoting nightmare starts. :-(

So what started out as a happy discovery just turned into another disappointment in how broken our software is.

All this time, I had assumed that rsync started a server with no specific arguments, and then communicated over the rsync protocol which files to get. I guess I've been lucky all these years and avoided explicitly naming weird file names.