grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] if timeout is set to zero, don't bother drawing the menu


From: Robert Millan
Subject: Re: [PATCH] if timeout is set to zero, don't bother drawing the menu
Date: Thu, 28 Feb 2008 11:57:56 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Sat, Feb 09, 2008 at 09:03:09PM +0100, Yoshinori K. Okuji wrote:
> On Friday 08 February 2008 17:18, Robert Millan wrote:
> > Fixes an ugly result of setting timeout=0.
> >
> > When this is combined with the "sleep" patch I just sent, user can
> > implement hiddenmenu-like functionality via scripting:
> >
> > echo -n "Press `ESC' to enter the menu... "
> > if sleep -v -i 10 ; then
> >   set timeout=10
> > else
> >   set timeout=0
> > fi
> 
> I think this is a bit strange. I don't think anybody expects that "sleep" 
> outputs a counter or is interrupted by a key input. It is too different from 
> POSIX's sleep.
> 
> My preference is rather to extend "read". Bash's "read" accepts a timeout and 
> some other options.

I started implementing this, and then noticed that it is a bit odd that read
prints timeout at the same time it is trying to obtain input from the user.

Timeout printing uses gotoxy() and erases current line.  Don't you think it'd
look annoying?

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]