On Mon, Feb 02, 2015 at 01:37:36PM +0100, Karel Zak wrote: > On Mon, Feb 02, 2015 at 08:29:23AM -0400, Peter Cordes wrote: > > > > Maybe link with GNU readline, to avoid reinventing the wheel. > > yep, and maybe for all fdisks, but it would be probably nice to have > it optional (--with-readline), and without readline keep it simple and > stupid. Yeah, I think that's the behaviour I've seen from other packages. When built without readline, they just leave the tty in cooked mode, so a line of input becomes read(2)able when the user presses return. I guess cfdisk already has an arrow-key driven UI, so the wrapper for readline (that compiles to a fallback #ifndef HAVE_READLINE) would have to put the tty in/out of cooked mode. -- #define X(x,y) x##y Peter Cordes ; e-mail: X(peter@cor , des.ca) "The gods confound the man who first found out how to distinguish the hours! Confound him, too, who in this place set up a sundial, to cut and hack my day so wretchedly into small pieces!" -- Plautus, 200 BC -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html