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

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



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 redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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