Installed /xfce/22.1.3/manjaro-xfce-22.1.3-minimal-230529-linux61.iso and there is a .nanorc in the /root home directory.
The only content is an include for /usr/share/nano-syntax-highlighting/*.nanorc. The root user should have the bare minimum configuration and the user can add later if desired, perhaps at the system level.
root should not get a .nanorc automatically. And, in this particular case the highlighting package currently has an unresolved bug.
In addition this overrides the users’ .config/nano/nanorc
I disagree. I think that is a nice addition where you don’t have to do extra work. It always bothers me when I use debian based servers, since there is no highlighting enabled by default…
I use nano 7.2 here and there is no issue with that line.
What? If you open nano with sudo then it uses /root/.nanorc and as user /home/user/.nanorc. There is nothing overwritten.
Priority goes like that:
Ëś/.nanorc
$XDG_CONFIG_HOME/nano/nanorc
Ëś/.config/nano/nanorc
Depending on which one is there, it takes the first in the priority list. So even here, nothing is overwritten, it is just how nano handles it.
I’m building a new virtual machine on the latest XFCE minimal Official Image, and was focused on root, but .nanorc actually exists in /etc/skel/ (does not on my host). I’ll change the title to reflect this.
I use .config/nano/nanorc for all users.
From man .nanorc:
I thought the line
include /usr/share/nano-syntax-highlighting/*.nanorc
It is the creation of .nanorc in the home directory that causes problems.
==> IMPORTANT!!!
==> To prevent overwriting your existing configuration, nanorc
==> was installed to /usr/share/nano-syntax-highlighting/nanorc.sample
==>
==> To install you should add the languages you want to your nano configuration file, system-wide or user-specific
==> system-wide: $ echo “include /usr/share/nano-syntax-highlighting/.nanorc" >> /etc/nanorc
==> user-specific: $ echo "include /usr/share/nano-syntax-highlighting/.nanorc” >> ~/.nanorc
The file /usr/share/nano-syntax-highlighting/nanorc.sample does exists.
And there it is, getting installed into /etc/skel/, in the PKGBUILD.