[libvirt] [PATCH 2/2] virsh: Allow users to reedit rejected XML

Eric Blake eblake at redhat.com
Tue May 22 16:24:59 UTC 2012


On 05/22/2012 09:45 AM, Michal Privoznik wrote:

>>> Failed. [R]eedit/[S]tart over again/[Q]uit?
>>
>> Eww. That does raise an interesting question.  Maybe it's better to make
>> it a two part question:
>>

>>
> 
> I don't like being asked twice. I think users would prefer one question
> with many answers, e.g. 'git add -p' produces:
> 
> 	Stage this hunk [y,n,q,a,d,/,e,?]?

Hmm, good counterexample.

> 
> So maybe:
> 
> 	Failed. Try again [y,n,f,?]?

This is at least nicer than the [r/s/q] proposal above, in that it
reuses y/n from normal parsing; maybe our yes/no parser could be
parameterized to state whether extra sequences are recognized, while
still allowing localization of the more common y/n responses in the
future.  I also like keeping 'y' and 'n' as sane defaults, in case
someone ever does 'yes | virsh ...' with an expectation of always
answering 'yes' being able to run the program to eventual completion.

> 
> with '?' printing out:
> y - yes
> n - no
> f - force to continue with my change and drop changes made meanwhile
> ? - print this help

I think you've persuaded me to go with this route, and not double
questioning.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120522/85ba4f44/attachment-0001.sig>


More information about the libvir-list mailing list