scopatz/nanorc

\< and \> don't work on OSX (effects, for example, c.nanorc)

semitrivial opened this issue · 4 comments

Hilariously, on mac, the \ appears to be a regular character escape when applied to < and >, so for example the "return" coloring gets applied to (the string literal) "" but not to actual return keywords like it's supposed to.

HI @semitrivial - weird! If you come up with a fix, pull requests are accepted.

The natural fix for Mac users is to replace < and > by [[:<:]] and [[:>:]] respectively, unfortunately this would break the nanorc file for other systems (tested it on Ubuntu, it breaks it there). It's quite shocking to me that nano outsources regexp parsing to the surrounding system, making nanorc inherently unportable like this.

@semitrivial Thanks for this. Sucks that I have to that just for OS X, but thanks anyway.

Reported as a bug in nano: https://savannah.gnu.org/bugs/index.php?47325 (Fixed)