nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit bf8bd02558bd5f10ff12e00917d6d41f2d3f2a18
parent 544d426d86bf524561ac00005138880020c16f40
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 20 Apr 2018 10:47:10 +0200

build: do not prefix an alternative rcfilename with a dot

When the user configures nano with --enable-altrcname=name,
the specified name should not be prefixed with a dot.

This fixes https://savannah.gnu.org/bugs/?53694.
Reported-by: Cody A. Taylor <codemister99@yahoo.com>

Diffstat:
Msrc/rcfile.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/rcfile.c b/src/rcfile.c @@ -31,7 +31,10 @@ #ifdef ENABLE_NANORC #ifndef RCFILE_NAME +#define HOME_RC_NAME ".nanorc" #define RCFILE_NAME "nanorc" +#else +#define HOME_RC_NAME RCFILE_NAME #endif static const rcoption rcopts[] = { @@ -1252,7 +1255,7 @@ void do_rcfiles(void) /* Now try the to find a nanorc file in the user's home directory * or in the XDG configuration directories. */ - if (have_nanorc(homedir, "/." RCFILE_NAME)) + if (have_nanorc(homedir, "/" HOME_RC_NAME)) parse_one_nanorc(); else if (have_nanorc(xdgconfdir, "/nano/" RCFILE_NAME)) parse_one_nanorc();