On 08/15/2012 02:49 AM, Benoît Canet wrote: >> I think an --format=json option would be a bit more extensible and >> better matches what most tools are doing these days. > > The qemu-img info subcommand already use the "-f" short option. > What alternative could be use instead of --format=json ?
You are right that the mnemonic 'format' collides with -f and -F (rebase), and 'output' collides with -o and -O (convert). Maybe we could use the mnemonic '--layout=json', since '-L' appears to be available? Or maybe '--machine=json' with -m, to indicate that the output is machine-parseable (and where other machine-parseable layouts like xml might be added in the future)? Also, there's no rule that says that the short option must match the mnemonic of the long option; we could always go with the short option of '-j' even if the long option is spelled '--format', even if it means a theoretical addition of '--format=xml' would map to the odd-looking '-j xml'. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature