From: Michael Chang <MChang@suse.com>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
Javier Martinez Canillas <javierm@redhat.com>,
Peter Jones <pjones@redhat.com>
Subject: Re: [PATCH] Enable pager by default
Date: Fri, 25 Oct 2019 06:16:41 +0000 [thread overview]
Message-ID: <20191025061632.GA16881@mazu> (raw)
In-Reply-To: <20191024143909.ebhal3kbt2nt43qg@tomti.i.net-space.pl>
On Thu, Oct 24, 2019 at 04:39:09PM +0200, Daniel Kiper wrote:
> On Thu, Oct 24, 2019 at 06:54:53AM +0000, Michael Chang wrote:
> > On Tue, Oct 22, 2019 at 04:04:28PM +0200, Daniel Kiper wrote:
> > > On Tue, Oct 22, 2019 at 10:30:20AM +0200, Javier Martinez Canillas wrote:
> > > > Hello Daniel,
> > > >
> > > > On 10/21/19 4:56 PM, Daniel Kiper wrote:
> > > > > On Fri, Oct 18, 2019 at 02:43:18PM +0200, Javier Martinez Canillas wrote:
> > > > >> From: Peter Jones <pjones@redhat.com>
> > > > >>
> > > > >> When user enters into the GRUB shell and tries to use help command, lot of
> > > > >> information is scrolled out of screen and the user doesn't have chance to
> > > > >> read it. Also, there isn't any information about 'set pager=1' at the end
> > > > >> of the help output, to tell the user how scrolling could be enabled.
> > > > >>
> > > > >> So just enable pager by default which leads to a much better experience.
> > > > >
> > > > > Hmmm... What will happen if a command produce tons of output during boot
> > > > > process? I am afraid that it will hang indefinitely waiting for an user
> > > > > input. This should not happen. So, I tend to agree that current help
> > > > > command behavior is annoying but I do not like the solution.
> > > >
> > > > Ok. I'll then explore having a paginated output only for the help command
> > > > instead of globally enabling it by default.
> > >
> > > Great! Though I would think about something which can be used also in
> > > other commands producing a lot of output. Maybe we should introduce "-p"
> > > (pause) command line option for such commands. And I am not against
> > > using existing code to do a pause. We just have to do it carefully.
> >
> > I'd like to add option to the list, which is grub could provide the
> > information to have the commands able to tell they are executed in
> > shell's interactive (aka command-line) or batch mode. After they could
> > turn on/off paginated output according to the shell mode they are with.
>
> Sounds interesting. However, I would go further. If pager == 1 and we are
> in batch mode then paging is inactive. If pager == 2 and we are in batch
> mode then paging is active. If we are in interactive mode then if
> pager != 0 then paging is active.
I agree completely. In this way we no longer have to worry about setting
page=1 would disrupt boot process as some command output could go overly
log and at the same time setting page=2 could enforce paginated output
everywhere, like what is working now. :)
Thanks,
Michael
>
> Daniel
next prev parent reply other threads:[~2019-10-25 6:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 12:43 [PATCH] Enable pager by default Javier Martinez Canillas
2019-10-21 14:56 ` Daniel Kiper
2019-10-22 8:30 ` Javier Martinez Canillas
2019-10-22 14:04 ` Daniel Kiper
2019-10-23 1:50 ` Nicholas Vinson
2019-10-23 9:13 ` Daniel Kiper
2019-10-23 11:26 ` Javier Martinez Canillas
2019-10-24 14:50 ` Daniel Kiper
2019-10-24 16:24 ` Vladimir 'phcoder' Serbinenko
2019-10-25 9:02 ` Javier Martinez Canillas
2019-10-30 12:12 ` Daniel Kiper
2019-10-30 12:32 ` adrian15 adrian15
2019-10-30 12:43 ` Javier Martinez Canillas
2019-10-24 6:54 ` Michael Chang
2019-10-24 14:39 ` Daniel Kiper
2019-10-25 6:16 ` Michael Chang [this message]
2019-10-25 6:48 ` Vladimir 'phcoder' Serbinenko
2019-10-28 6:21 ` Michael Chang
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=20191025061632.GA16881@mazu \
--to=mchang@suse.com \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
--cc=javierm@redhat.com \
--cc=pjones@redhat.com \
/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.