lhmouse / nano-win

GNU nano text editor for Windows [WARNING: The master branch is constantly rebased and force-pushed so don't expect it to be steady!! -end WARNING]
https://files.lhmouse.com/nano-win/
GNU General Public License v3.0
210 stars 25 forks source link

discuss config file location improvements #43

Open rkitover opened 2 years ago

rkitover commented 2 years ago

@lhmouse @akuropka

Following up on #42, Here are my suggestions for locations to search for the config file, we can discuss and I'll open a PR etc..

User Mode

Order Location
Primary %APPDATA%\nano\nanorc
Secondary %USERPROFILE%\.nanorc
Global %ALLUSERSPROFILE%\nano\nanorc

Admin/Elevated mode

Order Location
Primary %ALLUSERSPROFILE%\nano\elevated_nanorc
Secondary (for backcompat) %ALLUSERSPROFILE%\nanorc

%ALLUSERSPROFILE% maps to C:\ProgramData on recent versions of Windows.

lhmouse commented 2 years ago

Thanks for the suggestion; looks reasonable to me.