All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] Add paging instructions to normal and help prompts
@ 2022-11-04 17:05 Robbie Harwood
  2022-11-04 17:05 ` [PATCH v3 1/1] " Robbie Harwood
  0 siblings, 1 reply; 4+ messages in thread
From: Robbie Harwood @ 2022-11-04 17:05 UTC (permalink / raw)
  To: grub-devel; +Cc: Robbie Harwood, dkiper, javierm, phcoder, mchang

Rewrite to address review and clarifications with suggestion from Daniel
(thanks).

Be well,
--Robbie

Robbie Harwood (1):
  Add paging instructions to normal and help prompts

 grub-core/commands/help.c | 2 ++
 grub-core/normal/main.c   | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.35.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 1/1] Add paging instructions to normal and help prompts
  2022-11-04 17:05 [PATCH v3 0/1] Add paging instructions to normal and help prompts Robbie Harwood
@ 2022-11-04 17:05 ` Robbie Harwood
  2022-11-08 14:48   ` Daniel Kiper
  0 siblings, 1 reply; 4+ messages in thread
From: Robbie Harwood @ 2022-11-04 17:05 UTC (permalink / raw)
  To: grub-devel; +Cc: Robbie Harwood, dkiper, javierm, phcoder, mchang

This is not an ideal solution, as interactive users must always ru na
command in order to get the behavior they want, but it avoids
problematic interactions between prompting and sourcing files.

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
 grub-core/commands/help.c | 2 ++
 grub-core/normal/main.c   | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/grub-core/commands/help.c b/grub-core/commands/help.c
index ac3907f9df..2c70c7b417 100644
--- a/grub-core/commands/help.c
+++ b/grub-core/commands/help.c
@@ -135,6 +135,8 @@ grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
 	}
     }
 
+  grub_printf ("\n\nTo enable less(1)-like paging, `set pager=1`.\n");
+
   return 0;
 }
 
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
index cb0e8e7fd2..2cb48a94f5 100644
--- a/grub-core/normal/main.c
+++ b/grub-core/normal/main.c
@@ -380,7 +380,8 @@ grub_normal_reader_init (int nested)
 
   msg_formatted = grub_xasprintf (_("Minimal BASH-like line editing is supported. For "
 				    "the first word, TAB lists possible command completions. Anywhere "
-				    "else TAB lists possible device or file completions. %s"),
+				    "else TAB lists possible device or file completions.  To enable "
+                                    "less(1)-like paging, `set pager=1`.  %s"),
 				  nested ? msg_esc : "");
   if (!msg_formatted)
     return grub_errno;
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 1/1] Add paging instructions to normal and help prompts
  2022-11-04 17:05 ` [PATCH v3 1/1] " Robbie Harwood
@ 2022-11-08 14:48   ` Daniel Kiper
  2022-11-08 15:31     ` Robbie Harwood
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Kiper @ 2022-11-08 14:48 UTC (permalink / raw)
  To: Robbie Harwood; +Cc: grub-devel, javierm, phcoder, mchang

On Fri, Nov 04, 2022 at 01:05:37PM -0400, Robbie Harwood wrote:
> This is not an ideal solution, as interactive users must always ru na
> command in order to get the behavior they want, but it avoids
> problematic interactions between prompting and sourcing files.
>
> Signed-off-by: Robbie Harwood <rharwood@redhat.com>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> but...

> ---
>  grub-core/commands/help.c | 2 ++
>  grub-core/normal/main.c   | 3 ++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/grub-core/commands/help.c b/grub-core/commands/help.c
> index ac3907f9df..2c70c7b417 100644
> --- a/grub-core/commands/help.c
> +++ b/grub-core/commands/help.c
> @@ -135,6 +135,8 @@ grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
>  	}
>      }
>
> +  grub_printf ("\n\nTo enable less(1)-like paging, `set pager=1`.\n");

Are you OK with s/`/\"/g? If yes I can do it for you before committing
this patch?

> +
>    return 0;
>  }
>
> diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
> index cb0e8e7fd2..2cb48a94f5 100644
> --- a/grub-core/normal/main.c
> +++ b/grub-core/normal/main.c
> @@ -380,7 +380,8 @@ grub_normal_reader_init (int nested)
>
>    msg_formatted = grub_xasprintf (_("Minimal BASH-like line editing is supported. For "
>  				    "the first word, TAB lists possible command completions. Anywhere "
> -				    "else TAB lists possible device or file completions. %s"),
> +				    "else TAB lists possible device or file completions.  To enable "
> +                                    "less(1)-like paging, `set pager=1`.  %s"),

Do we need extra spaces here? I would be consistent with the rest of the
message and use one space everywhere? Again, I can make these changes
for you if you are OK with them.

Daniel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 1/1] Add paging instructions to normal and help prompts
  2022-11-08 14:48   ` Daniel Kiper
@ 2022-11-08 15:31     ` Robbie Harwood
  0 siblings, 0 replies; 4+ messages in thread
From: Robbie Harwood @ 2022-11-08 15:31 UTC (permalink / raw)
  To: Daniel Kiper; +Cc: grub-devel, javierm, phcoder, mchang

[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]

Daniel Kiper <dkiper@net-space.pl> writes:

> On Fri, Nov 04, 2022 at 01:05:37PM -0400, Robbie Harwood wrote:
>
>> ---
>>  grub-core/commands/help.c | 2 ++
>>  grub-core/normal/main.c   | 3 ++-
>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/grub-core/commands/help.c b/grub-core/commands/help.c
>> index ac3907f9df..2c70c7b417 100644
>> --- a/grub-core/commands/help.c
>> +++ b/grub-core/commands/help.c
>> @@ -135,6 +135,8 @@ grub_cmd_help (grub_extcmd_context_t ctxt __attribute__ ((unused)), int argc,
>>  	}
>>      }
>>
>> +  grub_printf ("\n\nTo enable less(1)-like paging, `set pager=1`.\n");
>
> Are you OK with s/`/\"/g? If yes I can do it for you before committing
> this patch?

That's fine.

>> +
>>    return 0;
>>  }
>>
>> diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
>> index cb0e8e7fd2..2cb48a94f5 100644
>> --- a/grub-core/normal/main.c
>> +++ b/grub-core/normal/main.c
>> @@ -380,7 +380,8 @@ grub_normal_reader_init (int nested)
>>
>>    msg_formatted = grub_xasprintf (_("Minimal BASH-like line editing is supported. For "
>>  				    "the first word, TAB lists possible command completions. Anywhere "
>> -				    "else TAB lists possible device or file completions. %s"),
>> +				    "else TAB lists possible device or file completions.  To enable "
>> +                                    "less(1)-like paging, `set pager=1`.  %s"),
>
> Do we need extra spaces here? I would be consistent with the rest of the
> message and use one space everywhere? Again, I can make these changes
> for you if you are OK with them.

Also fine, thanks.

Be well,
--Robbie

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-08 15:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04 17:05 [PATCH v3 0/1] Add paging instructions to normal and help prompts Robbie Harwood
2022-11-04 17:05 ` [PATCH v3 1/1] " Robbie Harwood
2022-11-08 14:48   ` Daniel Kiper
2022-11-08 15:31     ` Robbie Harwood

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.