nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] Improving nano's support for the XDG base directory spec


From: Simon Ochsenreither
Subject: [Nano-devel] Improving nano's support for the XDG base directory spec
Date: Sun, 1 Oct 2017 21:20:51 +0200 (CEST)

Hi everyone,

first of all, thanks for building this great application!

I wrote/updated a patch to add XDG support and attached it to the old ticket about the same topic: https://savannah.gnu.org/patch/?8523

In very basic terms, this adds an additional place from which a user's nanorc file is read.

For those who are happy with the way things currently work – nothing changes.
For those who want to have a cleaner home directory and easier backups – the situation is somewhat improved.

Before:

- Load $HOME/.nanorc

With patch:

- If $XDG_CONFIG_HOME is set, use $XDG_CONFIG_HOME/nanorc (XDG spec¹, Environment Variables, §2, first sentence)
- If $XDG_CONFIG_HOME is not set, use $HOME/.config/nanorc (XDG spec¹, Environment Variables, §2, second sentence)
- If $HOME/.config/nanorc does not exist, load $HOME/.nanorc

Please let me know if this patch is acceptable or needs additional changes.
(I think if $XDG_CONFIG_HOME is defined, nano should try $HOME/.nanor if $XDG_CONFIG_HOME/nanorc does not exist ... let me know your opinion and I'll change it.)

Thanks,

Simon

¹ https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html


reply via email to

[Prev in Thread] Current Thread [Next in Thread]