bugGNU nano - Bugs: bug #62997, an explanation is needed for...

 
 

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

bug #62997: an explanation is needed for putting a double quote plus blank in a nanorc regex

Submitter:  Benno Schulenberg <bens>
Submitted:  Thu 01 Sep 2022 07:27:54 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Thu 01 Sep 2022 03:34:25 PM UTC, comment #1: 

Fixed in git, commit e7491920, by adding a paragraph that says that multiple regexes can follow each other, separated by blanks, which means that a regex cannot contain double-quote-plus-blank, and that either of the two characters should be put between square brackets.

Benno Schulenberg <bens>
Group administrator
Thu 01 Sep 2022 07:27:54 AM UTC, original submission:  

To see what I mean, try to colorize a double-quoted word plus its surrounding spaces:

echo 'syntax default' >small.nanorc
echo 'color ,blue " "word" "' >>small.nanorc
src/nano --rc=small.nanorc README

See that nano complains about "Mistakes" in small.nanorc.  Type ^X to read the message: «Error ... on line 2: Regex strings must begin and end with a " character».

The problem is that for nano a regex ends when it finds a double quote followed by a blank (or end-of-line).  But this not mentioned anywhere in the man pages or the manual.

So... a paragraph needs to be added that explains this, and that suggests that when the combination 'double-quote blank' is needed, that either the double quote or the blank should be put between square brackets.  (And in the exceptional case that they are used together between square brackets, then the blank should come first -- but I think this one detail can be left to the reader to figure out.)

Benno Schulenberg <bens>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-11-16 bens Open/ClosedOpen Closed
    2022-09-01 bens StatusIn Progress Fixed
    2022-09-01 bens StatusNone In Progress
        Summaryexplanation is needed for double quote plus blank in a nanorc regex an explanation is needed for putting a double quote plus blank in a nanorc regex
    2022-09-01 bens Summarya nanorc regex cannot contain a double quote followed by a blank explanation is needed for double quote plus blank in a nanorc regex

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code