Re: -e escape rule

2016-10-30 Thread Samuel Williams
tom RSync "join" function to produce an appropriate command for -e argument. On 30 October 2016 at 04:49, Wayne Davison wrote: > On Sat, Oct 29, 2016 at 5:36 AM, Samuel Williams > wrote: >> >> The command >> >> ssh -l backup -i /etc/synco/id_rsa -o Con

Re: -e escape rule

2016-10-29 Thread Samuel Williams
ARGV generated would be ['ssh', '-l', 'backup', '-i', '/etc/synco/id_rsa', '-o', 'ConnectTimeout=60', '-o', 'BatchMode=yes']. Basically, even if there WAS no reason to do so, doesn't mean it's invalid

Re: -e escape rule

2016-10-28 Thread Samuel Williams
> Yeah, it only does space-splitting and that's all it will ever do. It still > looks to me like there is a bug in the original escaping, since any command > receiving that string is receiving a backslash that is not supposed to be > there. It should only be escaping the string enough to get it

Re: -e escape rule

2016-10-28 Thread Samuel Williams
line for handling whitespace. On 29 October 2016 at 16:24, Samuel Williams wrote: > Kevin, I agree with what you are saying on some level, but I don't > think the code does what you think it does. rsync -e "foo\\ bar" will > be executed by the shell and yield a cmd string

Re: -e escape rule

2016-10-28 Thread Samuel Williams
Wayne, I guess if you apply standard shell escaping logic you end up with a string which isn't processed correctly, yes, ssh complains, but only because Rsync passed the backslashes through without dealing with them. My opinion is that if Rsync is splitting a string based on whitespace it also need

Re: -e escape rule

2016-10-20 Thread Samuel Williams
Hmm, so after reviewing this in a bit more detail.. it would be very nice if at least backslash escapes would be supported. Quoted strings are pretty ugly, especially when nested several levels. Anyway, just my 2 cents. -- Please use reply-all for most replies to avoid omitting the mailing list.

Re: -e escape rule

2016-10-20 Thread Samuel Williams
Hi Dave, thanks for point that out. I didn't realise there was a detailed explanation of that field in the man page, I only saw the summary. Yes, that clearly explains how it's supposed to work. On 21 October 2016 at 01:46, Dave Howorth wrote: > On 2016-10-20 10:24, Samuel W

Re: -e escape rule

2016-10-20 Thread Samuel Williams
useful in some contexts. Anyway, rsync is pretty awesome. the -e option is only a minor annoyance, but it would be nice if this discussion could result in a tangible improvement. On 21 October 2016 at 00:03, Paul Slootman wrote: > On Thu 20 Oct 2016, Samuel Williams wrote: >> >

-e escape rule

2016-10-20 Thread Samuel Williams
Hello, I'm using Ruby's Shellwords module, which generates a string from an array, suitable for shell evaluation. Ruby's implementation prefers escaping whitespace with a backslash rather than quotes. However, this appears to cause some kind of issue in Rsync when it computes argv from -e option.