bugGNU nano - Bugs: bug #57547, [Request] add an option to read...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #57547: [Request] add an option to read the nanorc file from a custom path

Submitter:  Saagar Jha <saagarjha>
Submitted:  Tue 07 Jan 2020 03:34:27 AM UTC
   
 
Severity:  1 - Wish Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Jump to the original submission

Sun 09 Feb 2020 10:26:35 AM UTC, comment #8: 

The --rcfile feature has been released in version 4.8.  Thanks for posting.

Benno Schulenberg <bens>
Group administrator
Fri 17 Jan 2020 03:58:41 PM UTC, comment #7: 

(Oh, it still needs the documentation.  I'll do that later.)

Benno Schulenberg <bens>
Group administrator
Fri 17 Jan 2020 03:57:24 PM UTC, comment #6: 

The patch has been pushed to master, commit 343f97b3.  Thanks for testing.

Benno Schulenberg <bens>
Group administrator
Fri 17 Jan 2020 09:40:41 AM UTC, comment #5: 

The new patch looks good to me. Thanks for working on this!

Saagar Jha <saagarjha>
Thu 16 Jan 2020 01:04:12 PM UTC, comment #4: 

(Patches on a mailing list tend to acquire DOS line endings, so you first have to strip those \r codes, for example with nano: open the patch, then ^O M-D <Enter> ^X).

Benno Schulenberg <bens>
Group administrator
Thu 16 Jan 2020 12:51:44 PM UTC, comment #3: 

Thanks for the feedback.  Attached is an improved version, with an error message for a non-existent file.  I've chosen to let it die when the specified rcfile does not exist, similar to when a specified operating dir or backup dir does not exist.

(file #48238)

Benno Schulenberg <bens>
Group administrator
Wed 15 Jan 2020 08:39:49 PM UTC, comment #2: 

I couldn't figure out how to apply the patch in the email you sent yesterday, but the one here applied cleanly so I took it for a spin. It works great, but on thing I noticed is that it won't warn you if you pass in a file that doesn't exist: it'll just silently start up without reading anything. Maybe it should show an error in the status bar, similar to the one you'd get if there are errors in the nanorc file?

Saagar Jha <saagarjha>
Wed 15 Jan 2020 06:03:37 PM UTC, comment #1: 

Attached patch allows using -f somenanorcfile or --rcfile=somenanorcfile to load a custom nanorc file and skip the loading of /etc/nanorc and ~/.nanorc.  Please test and/or comment.

(file #48235)

Benno Schulenberg <bens>
Group administrator
Tue 07 Jan 2020 03:34:27 AM UTC, original submission:  

It would be nice if it was possible to have nano load the nanorc file from a custom path specified via a command line option. Some additional side effects beyond the obvious ones would be making it possible to prevent the default loading of /etc/nanorc, or allow for dynamically swapping between multiple configurations.

Saagar Jha <saagarjha>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Updated the item)
  • -email is unavailable- added by saagarjha (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-09 bens Open/ClosedOpen Closed
    2020-01-17 bens StatusIn Progress Fixed
    2020-01-16 bens Attached File- Added 0001-new-feature-allow-specifying-a-custom-nanorc-file-on.patch, #48238
    2020-01-15 bens Attached File- Added 0001-new-feature-allow-specifying-a-custom-nanorc-file-on.patch, #48235
        Severity3 - Normal 1 - Wish
        StatusNone In Progress
        Assigned toNone bens
        Summary[Request] Add an option to read the nanorc file from a custom path [Request] add an option to read the nanorc file from a custom path

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code