From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oqi74-0004Py-MK for mharc-grub-devel@gnu.org; Thu, 03 Nov 2022 17:51:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqi73-0004PA-6T for grub-devel@gnu.org; Thu, 03 Nov 2022 17:51:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqi71-0001tu-Ly for grub-devel@gnu.org; Thu, 03 Nov 2022 17:51:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667512257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=70RvOdEPn0AXYfpfcusQmsrn489S3wmJD19h9KCdwfE=; b=WriOsFMjPhedKjSvdJgPYwCm0HSczDVIQHP6CbkYv/YgfqHfhcs69zLWpc5ptYRa86FrgT Au8KgT4ODryVs3prnfKDeB2I/wZW6ljLUXX7VolWM1eS5lmEQbdcEivegLzJNc+lAIEA9G X50Pw0lKO8ei7weobAU7GlzQZIYSP78= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-151-bDbSFfw-M8maItjlfMClHQ-1; Thu, 03 Nov 2022 17:50:55 -0400 X-MC-Unique: bDbSFfw-M8maItjlfMClHQ-1 Received: by mail-qk1-f199.google.com with SMTP id w13-20020a05620a424d00b006e833c4fb0dso3072535qko.2 for ; Thu, 03 Nov 2022 14:50:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=70RvOdEPn0AXYfpfcusQmsrn489S3wmJD19h9KCdwfE=; b=mu7FQibNpuzAyV+D7/1rf0iYIOTFV+h0EsZxZOk6s/jIXNAX0BngdPePdipN+dv21a y1qglWAeSlP++oYAX69CARCPmcFPN9onJ4MTSU8dRWIwqDazh0qdUDfXNfU2R9+iMFpC jQU5qVPhQ85/zc2i6LUzK0fqXcWaCwr9eqnW+8ta4iTp/plOMqiII9obVjr+yk1JK1rA ggWNFVlcUoiONVx4Agvkww32eR0BX7VJEiK8sYuTkeWW9kCH0R9FHpym6qM3/PSoWbI3 O24bgH6GQoEBx3L0fiZQt7Ns3twy70HFB4XJ0tv4DuFWGoNrzf+QL9AXQecF4dPhLj2h GZqA== X-Gm-Message-State: ACrzQf0wNcwJvSX6i6Yg1xTtzCdG3J3S9+7QNDuFZ+ycbQDdd8nkcih/ 0gVMvuU32dBy9XMOumzt/dnpUC9q2xSEHyJGqRvWKTig/C+6OjdGWdYH8oLuFPBtEDgjyQIo8+2 xkB6tl450yNw= X-Received: by 2002:a05:622a:11cf:b0:39c:d63a:d79 with SMTP id n15-20020a05622a11cf00b0039cd63a0d79mr27245438qtk.260.1667512255176; Thu, 03 Nov 2022 14:50:55 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7lq2hTHdykxdrXaSJfla1Fo1FHzX0EEtJfp3SnD1aCK3HZacCk7ks4drdwrA6yVR90egRLhg== X-Received: by 2002:a05:622a:11cf:b0:39c:d63a:d79 with SMTP id n15-20020a05622a11cf00b0039cd63a0d79mr27245419qtk.260.1667512254758; Thu, 03 Nov 2022 14:50:54 -0700 (PDT) Received: from localhost ([2600:4040:520a:8800:7d1c:f0a7:5c44:ed0e]) by smtp.gmail.com with ESMTPSA id i18-20020a05620a405200b006fa8299b4d5sm1107318qko.100.2022.11.03.14.50.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 14:50:54 -0700 (PDT) From: Robbie Harwood To: Daniel Kiper Cc: grub-devel@gnu.org, javierm@redhat.com, phcoder@gmail.com, mchang@suse.com Subject: Re: [PATCH v2 1/1] normal: Add paging instructions to interactive prompt In-Reply-To: <20221103155812.qyuryvjmp5bfqrh3@tomti.i.net-space.pl> References: <20221031193549.92061-1-rharwood@redhat.com> <20221031193549.92061-2-rharwood@redhat.com> <20221103155812.qyuryvjmp5bfqrh3@tomti.i.net-space.pl> Date: Thu, 03 Nov 2022 17:50:51 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=170.10.129.124; envelope-from=rharwood@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.047, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2022 21:51:01 -0000 --=-=-= Content-Type: text/plain Daniel Kiper writes: > On Mon, Oct 31, 2022 at 03:35:49PM -0400, Robbie Harwood wrote: >> Conditionally add instructions for enabling paging to the prompt of >> interactive shells. This is not an ideal solution, as ineractive users >> must always run a command in order to get the behavior they want, but it >> avoids problematic interactions between prompting and sourcing files. >> >> Signed-off-by: Robbie Harwood >> --- >> grub-core/normal/main.c | 4 +++- >> grub-core/normal/term.c | 6 ++++++ >> include/grub/normal.h | 1 + >> 3 files changed, 10 insertions(+), 1 deletion(-) >> >> diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c >> index cb0e8e7fd2..d9d7c4ad28 100644 >> --- a/grub-core/normal/main.c >> +++ b/grub-core/normal/main.c >> @@ -411,9 +411,11 @@ grub_normal_read_line_real (char **line, int cont, int nested) >> if (cont) >> /* TRANSLATORS: it's command line prompt. */ >> prompt = _(">"); >> - else >> + else if (grub_get_more()) >> /* TRANSLATORS: it's command line prompt. */ >> prompt = _("grub>"); >> + else >> + prompt = _("(enable paging with `set pager=1`) grub>"); > > Do we really need to update prompt? Why do not print it once at the top > of the screen after entering into normal mode first time? My thinking was this: if a user enters the command prompt from the menu and types "help", then not only is it not paginated, but the instructions for enabling pagination have scrolled off the screen. Rereading I do see that you and Vladimir were after the initial blob, not the command line prompt. I don't know if I agree that's sufficient... will think about it more, I guess. Be well, --Robbie --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEA5qc6hnelQjDaHWqJTL5F2qVpEIFAmNkN7sUHHJoYXJ3b29k QHJlZGhhdC5jb20ACgkQJTL5F2qVpEL9EA/9EPVVye/IULIe6IfZl2ynU7EJicNr US16D0RVoZuzkdNKjnS+MLNAoKUyy2zAf7ztpYNjaLaeTrKiGODUrHLuOQnU2URf dHllO9PyAfxTwkbHAoPQvpeWou1N4sTWAvg3iyDLuAR1zeSGvQ+0yuq8yRah+vtI dhu5axGMf5N/KAu+C78LV+/YE2+mRf4AOuSvuJ4AHPpd1AZcZ3sWgzLkvo8i3ODQ ufJrlskw1pWZVQAagvn+I1oxZZkzfAz0IM0r2wjtfrlnEObkL3kiJnutbZ0P4xeB bdw66XBx0HjUWjJu/OT2+IS/x7REmF7vWZJFmYBwy2OyfdsB7iB5AgQNBfa4x5Sw FGVSVHGQo86SQ65huU6wLZHeo7aIj0tkSLxfV+7VYpg7FNbIT2qnrRLyVC84Zp5W zVoSVKv7I/fwcKUq+/SEw+ObyPOFhBrmZo0I1QWxiejW5KSDcQdn4eOL4/6DfpyW fwfHvJFpb6XPOaOc5csRchmflwQM6sMTB+9GDr9ygcqdYdSXTBoxAMZuNqUOrs6d tbGjJexIKtxEg7pOcmVebxkLeUXSTX26yeHaI4JL3oQ4yChKhCaeykW5kZqTcZtu G+8vOUhK2AnBIr2vc5joF/ePm2P+Jqc7Y3pAp2Kue48dOulxje01CgbuLlMg3WzT 7P2Mu+Ypgajh3TY= =GSHg -----END PGP SIGNATURE----- --=-=-=--