Re: [Illustration PATCH] add -i: accept single-keypress input

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

 



Junio C Hamano wrote:
> Hmm, you could trigger the action immediately after seeing _enough_ number
> of characters to disambiguate instead of stop-and-prompt, I guess?  That
> way, you would get a single-key merely as a degenerate case when the
> choices are all distinct.

I don't think that's very nice.  On the one hand, you'd really want to
allow the user to delete some of the input again if he decides to do
something else instead, and we'd either need readline or need to
reinvent it for that.  On the other hand, some possible choices might
be a valid prefix of some _other_ choices, at which point you need a
terminator (such as the <enter>) anyway.  I expect this to be fairly
common since many of the list_and_choose() prompts are numbered, so
that 1 and 10 run into this problem.

Then again I don't use add -i, so someone else should say what to do.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux