|
From: | Saagar Jha |
Subject: | Re: Backwards (and forwards) compatible nanorc files |
Date: | Sun, 5 Jan 2020 21:10:36 -0800 |
Comments inline. Saagar Jha
Depending on the circumstances, I either grab a full copy of my dotfiles and “install” it, a process which (among other things) makes it available at ~/.nanorc, or I just grab the file individually.
I use other machines too; those are just some that give an idea of the spread of versions I often deal with. I have the family Mac currently set up so I do not regularly install things or even exercise admin access; my use of nano on that machine falls somewhere along the lines of “I need nano because I edit files from time to time, often enough that I would like to have some of my nanorc’s settings, but I don’t use it often enough to justify installing and maintaining a package manager on it to keep nano up-to-date”. I agree that the premise is a bit convoluted, but it’s coming from a position of not wanting to make too many changes to the computer since I don’t even use it all that often.
For a while tried to keep my nanorc file portable by just not including incompatible settings, but it was just not fun to use at all so I’ve been slowly adding in things after I came up with the versioning hack. I could probably live with what I have right now when Apple either updates their version of nano or puts it out of its misery like they did with Emacs…
…but yes, I was hoping there might be something like this that I missed, or some clever solution that others were using to work around this. Oh well.
That’s fine, I’m not too bothered with nano adding new features and changing some of its stranger defaults even if it can occasionally cause issues like these. But perhaps it might be possible to make it possible to work around the changes somewhat for future versions? For example, I could see some sort of feature where you could have multiple, versioned nanorc files and nano would load the correct one automatically, or perhaps you could invoke it with --rcfile= option to pass it a custom nanorc path to load and I could have a Bash alias that was like like nano=“nano --rcfile=~/.nanorc-$(nano --version | grep …)” to pick a compatible one.
|
[Prev in Thread] | Current Thread | [Next in Thread] |