grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Enable pager by default


From: Michael Chang
Subject: Re: [PATCH] Enable pager by default
Date: Mon, 28 Oct 2019 06:21:33 +0000

On Fri, Oct 25, 2019 at 08:48:05AM +0200, Vladimir 'phcoder' Serbinenko wrote:
> On Fri, 25 Oct 2019, 08:20 Michael Chang, <address@hidden> wrote:
> 
> > 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 <address@hidden>
> > > > > > >>
> > > > > > >> 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. :)
> >
> This increases complexity. Like what is batch mode. Is running sourcefile
> batch or no?

Yes, any running script (via source or similar) from interactive shell
is also batch mode, only the command directly read from user's input in
grub's command shell is considered interactive.

> There will be edge cases like this. More complexity is more
> risk. Moreover in this case the risk is not contained unlike in e.g.
> filesystem modules that are not even loaded unless needed. Also it fails at
> informing the user. In fact it does the opposite by making it more
> confusing at first glance. Informing the user on welcome message is better

OK. Adimttedly new behavior is more complex and more difficult to tell
would inadvertantly enable interactive output. I am fine going with
either way being discussed in this thread. :)

Thanks,
Michael

> 
> >
> > Thanks,
> > Michael
> >
> > >
> > > Daniel
> >
> > _______________________________________________
> > Grub-devel mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >

> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel




reply via email to

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