I'm trying to customize nano to my needs, I copied nanorc from the /etc directory in my home directory and haven't edited anything so far.
My goal is to enable syntax highlighting for config files such as .bashrc. Syntax highlighting already works when I assign an extension to files such as file.py but it doesn't work for config files which are usually full of comments and options unless I explicitly type nano configfile --syntax=sh
. I would like this flag to be enabled by default.
When looking into the nanorc file I noticed the statement include /usr/share/nano/*.nanorc
. When sourcing the file with source .nanorc
I get the following error:
.nanorc:236: command not found: include
Why is this happening and how can I fix it? Thanks!
.nanorc
files aren't shell scripts? they are meant to be read and parsed internally bynano
itself - not by your shell – steeldriver Feb 16 '18 at 18:35