Module Name:    src
Committed By:   uwe
Date:           Mon Sep 23 12:12:36 UTC 2024

Modified Files:
        src/etc/skel: dot.profile

Log Message:
dot.profile: add commented out LESS example

Switch commented out PAGER from more(1), the default, to less(1), so
that a user can just uncomment the line and doesn't have to edit it.

While here, add commented out example of setting less(1) options with
LESS and explain how you can use -X to alleviate the pain from
alternate screen switching (b/c, of course, nothing is more user
friendly than wiping away from the screen the manual page you have
just been reading in your PAGER and want to peek at again as you are
typing the command).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/etc/skel/dot.profile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/etc/skel/dot.profile
diff -u src/etc/skel/dot.profile:1.11 src/etc/skel/dot.profile:1.12
--- src/etc/skel/dot.profile:1.11	Mon Sep 23 11:38:50 2024
+++ src/etc/skel/dot.profile	Mon Sep 23 12:12:36 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: dot.profile,v 1.11 2024/09/23 11:38:50 uwe Exp $
+#	$NetBSD: dot.profile,v 1.12 2024/09/23 12:12:36 uwe Exp $
 #
 # This is the default .profile file.
 # Users are expected to edit it to meet their own needs.
@@ -27,7 +27,14 @@ export EDITOR=vi
 # Set the pager. This is used by, among other things, man(1) for
 # showing man pages. The default is "more". Another reasonable choice
 # (included with the system by default) is "less".
-#export PAGER=more
+#export PAGER=less
+
+# Many modern terminal emulators don't provide a way to disable
+# alternate screen switching (like xterm's titeInhibit).  less(1) has
+# its own option (-X) for that that you can use to alleviate the pain,
+# as PAGER is the most common scenario for hitting this.  Add other
+# flags according to taste.
+#export LESS='-i -M -X'
 
 # Set your default printer, if desired.
 #export PRINTER=change-this-to-a-printer

Reply via email to