commit aac312618395afeae57dc78a05ce85c875813346
parent 63cddceeaa191c575c581ac84e5baa16d0cab85f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 19 Jan 2020 13:27:41 +0100
docs: improve the description of which rc-files are read during startup
Diffstat:
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/doc/nano.1 b/doc/nano.1
@@ -331,6 +331,8 @@ hard-wrapping of long lines, \fBM\-S\fR toggles soft-wrapping,
See at the end of the \fB^G\fR help text for a complete list.
.SH FILES
+When \fB\-\-rcfile\fR is given, \fBnano\fR will read just the specified file
+for setting its options and syntaxes and key bindings. Without that option,
\fBnano\fR will read two configuration files: first the system's
\fInanorc\fR (if it exists), and then the user's \fInanorc\fR (if it
exists), either \fI~/.nanorc\fR or \fI$XDG_CONFIG_HOME/nano/nanorc\fR
diff --git a/doc/nano.texi b/doc/nano.texi
@@ -690,10 +690,13 @@ The following global toggles are available:
The nanorc files contain the default settings for @command{nano}. They
should be in Unix format, not in DOS or Mac format. During startup,
-@command{nano} will first read the system-wide settings, from /etc/nanorc
-(the exact path might be different), and then the user-specific settings,
+if @option{--rcfile} is not given, @command{nano} will read two files:
+first the system-wide settings, from @file{/etc/nanorc} (the exact path
+might be different on your system), and then the user-specific settings,
either from @file{~/.nanorc} or from @file{$XDG_CONFIG_HOME/nano/nanorc}
or from @file{.config/nano/nanorc}, whichever exists first.
+If @option{--rcfile} is given, @command{nano} will read just the
+specified settings file.
A nanorc file accepts a series of "set" and "unset" commands, which can
be used to configure @command{nano} on startup without using command-line
diff --git a/doc/nanorc.5 b/doc/nanorc.5
@@ -30,13 +30,16 @@ If you want the old, Pico behavior back, you can use \fBset breaklonglines\fR,
\fBset jumpyscrolling\fR, and \fBset emptyline\fR.
.SH DESCRIPTION
-The \fInanorc\fP file contains the default settings for \fBnano\fP, a
-small and friendly editor. The file should be in Unix format, not in
-DOS or Mac format. During startup, \fBnano\fP will first read the
+The \fInanorc\fP files contain the default settings for \fBnano\fP, a
+small and friendly editor. They should be in Unix format, not in
+DOS or Mac format. During startup, if \fB\-\-rcfile\fR is not given,
+\fBnano\fR will read two files: first the
system-wide settings, from \fI/etc/nanorc\fP (the exact path might be
different on your system), and then the user-specific settings, either
from \fI~/.nanorc\fR or from \fI$XDG_CONFIG_HOME/nano/nanorc\fR
or from \fI~/.config/nano/nanorc\fR, whichever is encountered first.
+If \fB\-\-rcfile\fR is given, \fBnano\fR will read just the specified
+settings file.
.SH OPTIONS
The configuration file accepts a series of \fBset\fP and \fBunset\fP