qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Non-flat command line option argument syntax


From: Eric Blake
Subject: Re: [Qemu-devel] Non-flat command line option argument syntax
Date: Mon, 27 Feb 2017 13:47:59 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 02/27/2017 07:36 AM, Markus Armbruster wrote:

> 
>>                  Maybe just 'foo.array[]' (without any =) for an empty
>> array or something like that.
> 
> Yes, that should do.  Likewise foo.object{} for empty object.
> 
> {} doesn't even need quoting.  [] may.

[contents] needs quoting, but [] does NOT need shell quoting (no shells
treat it as a glob), for the same reason that 'if [ -e "$file" ];' needs
no quoting around the [ or ] (the shell only requires quotes for [ if
the rest of the shell word can look like a valid glob, but globs require
intermediate content before the ]).

>> Before we introduce anything like this, do we actually need it?
> 
> I don't know whether anything needs optional, present and empty.  But
> even if the answer is "no" today, it need not remain "no".
> 
> Anyone running into a case of "yes", will have to fall back to the JSON
> form of -blockdev.  Strengthens my belief that providing JSON there is a
> good idea.
> 
> The insufficient generality of dotted keys bugs me a bit.  Not sure
> whether it justifies more syntax now.  But we should document it.

I agree that documenting it as a shortcoming of dotted form and pointing
to JSON form is okay.  I also like that we are leaving the door open for
future expansion, if needed, and think that is better than inventing the
syntax now, especially for what we are trying to get into 2.9.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]