Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discuss config file location improvements #43

Open
rkitover opened this issue Jul 4, 2022 · 1 comment · May be fixed by #44
Open

discuss config file location improvements #43

rkitover opened this issue Jul 4, 2022 · 1 comment · May be fixed by #44

Comments

@rkitover
Copy link

rkitover commented Jul 4, 2022

@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
Copy link
Owner

lhmouse commented Jul 4, 2022

Thanks for the suggestion; looks reasonable to me.

rkitover added a commit to rkitover/nano-win that referenced this issue Jul 27, 2022
Fix lhmouse#43

For non-elevated users, search for the config file in this order:

1. %ALLUSERSPROFILE%\nano\nanorc (global)
2. %SystemRoot%\nanorc (global, for backcompat)
3. %USERPROFILE%\.nanorc
4. %APPDATA%\nano\nanorc

For elevated users, the order is:

1. %ALLUSERSPROFILE%\nano\elevated_nanorc
2. %ALLUSERSPROFILE%\nanorc (for backcompat, should be removed later)

Signed-off-by: Rafael Kitover <[email protected]>
@rkitover rkitover linked a pull request Jul 27, 2022 that will close this issue
rkitover added a commit to rkitover/nano-win that referenced this issue Jul 27, 2022
Fix lhmouse#43

For non-elevated users, search for the config file in this order:

1. %ALLUSERSPROFILE%\nano\nanorc (global)
2. %SystemRoot%\nanorc (global, for backcompat)
3. %USERPROFILE%\.nanorc
4. %APPDATA%\nano\nanorc

For elevated users, the order is:

1. %ALLUSERSPROFILE%\nano\elevated_nanorc
2. %ALLUSERSPROFILE%\nanorc (for backcompat, should be removed later)

Signed-off-by: Rafael Kitover <[email protected]>
rkitover added a commit to rkitover/nano-win that referenced this issue Jul 28, 2022
Fix lhmouse#43

For non-elevated users, search for the config file in this order:

1. %ALLUSERSPROFILE%\nano\nanorc (global)
2. %SystemRoot%\nanorc (global, for backcompat, should be removed in the
   future)
3. %USERPROFILE%\.nanorc
4. %APPDATA%\nano\nanorc

For elevated users, the order is:

1. %ALLUSERSPROFILE%\nano\elevated_nanorc
2. %ALLUSERSPROFILE%\nanorc (for backcompat, should be removed later)

Signed-off-by: Rafael Kitover <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants