All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yoshinori K. Okuji" <okuji@enbug.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] if timeout is set to zero, don't bother drawing the menu
Date: Thu, 28 Feb 2008 23:25:17 +0100	[thread overview]
Message-ID: <200802282325.17822.okuji@enbug.org> (raw)
In-Reply-To: <20080228105756.GA2341@thorin>

On Thursday 28 February 2008 11:57, Robert Millan wrote:
> 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?

Maybe. But we don't care about the character entered by the user in this case, 
so we could simply disable echoing.

Okuji



  reply	other threads:[~2008-02-28 22:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 16:18 [PATCH] if timeout is set to zero, don't bother drawing the menu Robert Millan
2008-02-09 10:59 ` Robert Millan
2008-02-09 20:03 ` Yoshinori K. Okuji
2008-02-09 22:09   ` Robert Millan
2008-02-10  7:10     ` Yoshinori K. Okuji
2008-02-10 12:55       ` Robert Millan
2008-02-10 20:07         ` Yoshinori K. Okuji
2008-02-10 20:24           ` Isaac Dupree
2008-02-28 10:57   ` Robert Millan
2008-02-28 22:25     ` Yoshinori K. Okuji [this message]
2008-03-03 22:22       ` Robert Millan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802282325.17822.okuji@enbug.org \
    --to=okuji@enbug.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.