Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1or08b-0003qp-0t for mharc-grub-devel@gnu.org; Fri, 04 Nov 2022 13:05:49 -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 1or08Y-0003qG-Pv for grub-devel@gnu.org; Fri, 04 Nov 2022 13:05:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1or08V-0007yL-UH for grub-devel@gnu.org; Fri, 04 Nov 2022 13:05:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667581542; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cum1nF3MQDbUdBrwBGLvgT5ptH7is4yTGNGhUuFdTW0=; b=POUo4YHKkAMFInOv5SMCVY6Dy88Ze+GPPkPutcjLIihK9LvOUkfuiaZ5LPJVfz9dGI0TJk bRIe2hhBLzuaukbLZieuajavOItAN3HfriEwi7xXmkNSCfuxKcOlCoDhx6Q8/FaciqaoV2 uTPjmXkl6uDYOIkockzWYHz3DYxtqXw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-60-NQEufdKfPRq_trm31N5Srg-1; Fri, 04 Nov 2022 13:05:39 -0400 X-MC-Unique: NQEufdKfPRq_trm31N5Srg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 07EBC3817973; Fri, 4 Nov 2022 17:05:39 +0000 (UTC) Received: from eesha.redhat.com (unknown [10.22.32.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 889A9492B0D; Fri, 4 Nov 2022 17:05:38 +0000 (UTC) From: Robbie Harwood To: grub-devel@gnu.org Cc: Robbie Harwood , dkiper@net-space.pl, javierm@redhat.com, phcoder@gmail.com, mchang@suse.com Subject: [PATCH v3 1/1] Add paging instructions to normal and help prompts Date: Fri, 4 Nov 2022 13:05:37 -0400 Message-Id: <20221104170537.506302-2-rharwood@redhat.com> In-Reply-To: <20221104170537.506302-1-rharwood@redhat.com> References: <20221104170537.506302-1-rharwood@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Received-SPF: pass client-ip=170.10.133.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.045, 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: Fri, 04 Nov 2022 17:05:47 -0000 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 --- 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