aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-05 18:43:33 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-05 23:59:39 +0900
commit3cdafe9be19c7d8b9351f68338b0b94bac9903ee (patch)
tree65de69b2d597b63c1e4a0d2348e8fd9aba2c77b1 /ruby.c
parentb5467ae38a5170d85d19499f18ea351c479bc414 (diff)
downloadruby-3cdafe9be19c7d8b9351f68338b0b94bac9903ee.tar.gz
Move per sections in help message
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 7b233e4106..b2d412c49d 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1801,7 +1801,10 @@ rb_f_chomp(int argc, VALUE *argv, VALUE _)
static void
setup_pager_env(void)
{
- if (!getenv("LESS")) ruby_setenv("LESS", "-R"); // Output "raw" control characters.
+ if (!getenv("LESS")) {
+ // Output "raw" control characters, and move per sections.
+ ruby_setenv("LESS", "-R +/^[A-Z].*");
+ }
}
#ifdef _WIN32