Re: [PATCH] send-email: improve recipients_cmd()

2013-04-29 Thread Junio C Hamano
Felipe Contreras writes: >> so if we want to get rid of \Q\E, it would be: >> >> open $fh, '-|', qw(sh -c), "$cmd " . '"$@"', '-', @args >> > > I don't know if that would be better, or converting @args to a list of > quoted strings, essentially keeping the current behavior. I tend to agr

Re: [PATCH] send-email: improve recipients_cmd()

2013-04-28 Thread Felipe Contreras
On Mon, Apr 29, 2013 at 12:24 AM, Junio C Hamano wrote: > Felipe Contreras writes: > >>> open $fh, "-|", qw(sh -c), $cmd, @args >> >> That doesn't seem to work for me. > > My fault. It needs to form a command line like this: > > sh -c 'cccmd --frotz --nitfol "$@"' - a r g s > > [

Re: [PATCH] send-email: improve recipients_cmd()

2013-04-28 Thread Junio C Hamano
Felipe Contreras writes: >> open $fh, "-|", qw(sh -c), $cmd, @args > > That doesn't seem to work for me. My fault. It needs to form a command line like this: sh -c 'cccmd --frotz --nitfol "$@"' - a r g s [jc: goes and tries $ sh -c 'echo X Y "$@"' - a r g s X Y

Re: [PATCH] send-email: improve recipients_cmd()

2013-04-28 Thread Felipe Contreras
On Sun, Apr 28, 2013 at 2:18 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> We don't need to quote the filename to pass to the command, we can use >> an array of all the arguments to pass to the command, which is safer, >> and more extensible. >> >> Commit a47eab0 (send-email: use the

Re: [PATCH] send-email: improve recipients_cmd()

2013-04-28 Thread Junio C Hamano
Felipe Contreras writes: > We don't need to quote the filename to pass to the command, we can use > an array of all the arguments to pass to the command, which is safer, > and more extensible. > > Commit a47eab0 (send-email: use the three-arg form of open in > recipients_cmd) stated we couldn't p

[PATCH] send-email: improve recipients_cmd()

2013-04-27 Thread Felipe Contreras
We don't need to quote the filename to pass to the command, we can use an array of all the arguments to pass to the command, which is safer, and more extensible. Commit a47eab0 (send-email: use the three-arg form of open in recipients_cmd) stated we couldn't pass $file directly, but in fact, we ca