Michael Tokarev <m...@tls.msk.ru> writes: > 12.05.2011 00:49, Jan Kiszka пишет: >> On 2011-05-11 18:08, Stefan Hajnoczi wrote: >>> On Wed, May 11, 2011 at 4:22 PM, Carl Karsten <c...@personnelware.com> >>> wrote: >>>> On Wed, May 11, 2011 at 6:01 AM, Markus Armbruster <arm...@redhat.com> >>>> wrote: >>>>> Stefan Hajnoczi <stefa...@gmail.com> writes: >>>>> >>>>>> On Tue, May 10, 2011 at 6:40 PM, Carl Karsten <c...@personnelware.com> >>>>>> wrote: >>>>>>> I would expect the syntax to look like this: >>>>>>> >>>>>>> qemu -hda 1.qcow2 -net nick -net >>>>>>> user,hostname=qemu,search=example.com,sales.example.com >>>>>> >>>>>> Comma escaping is needed but it seems like a reasonable feature to me. >>>>> >>>>> Comma escaping is ugly: >>>>> -net user,hostname=qemu,search=example.com,,sales.example.com >>>>> >>>>> Could we have multiple search options instead? Like this: >>>>> -net user,hostname=qemu,search=example.com,search=sales.example.com >>>>> >>>> >>>> How about: >>>> >>>> -net user,hostname=qemu,search="example.com,sales.example.com" >>> >>> That does not work the way you'd expect: >>> $ echo asdf=asdf,ok="this,is,a,test" >>> asdf=asdf,ok=this,is,a,test >>> >>> Also, let's not get into the business of matching quotes and passing >>> them escaped on the shell. That's just as ugly as escaping commas and >>> more work. >>> >>> I think the two options are using QEMU's typical comma escaping ',,' >>> or specifying the option multiple times. I'd go with comma escaping >>> for consistency. I'm not aware of any other option in QEMU that is >>> specified multiple times. >> >> -net user,hostfwd=...,hostfwd=... >> >> Let's got for multiple specification, ',,' is just ugly IMHO. > > I second this, just repeat the specification, please no double ,,. > Or alternatively, search1=foo,search2=bar, but this is also sort > of ugly. > > But I'm not sure why there's no way to use some other character, > like colon (:) for example - it's used for protocol:details > already, and for domain names it works well too...
Too clever, in my opinion. Breaks down when option values may contain ':'. While that's not the case for domain names, it still means it's a special-purpose syntactic hack. Let's follow the hostfwd precedence and permit multiple search options.