nano 2.8.0 reports bad regex when including nanorc files
Guy Yur
guyyur at gmail.com
Thu Apr 6 19:34:48 UTC 2017
Hi,
nano 2.8.0 complains on bad regex for "[[:<:]]" and [[:>:]]
when I include nanorc files in /usr/local/etc/nanorc:
include "/usr/local/share/nano/awk.nanorc"
Error in /usr/local/share/nano/awk.nanorc on line 22: Bad regex
"[[:<:]](system|fflush)[[:>:]]": Invalid character class name
In 2.7.5 the libc regex was used but in 2.8.0 the bundled regex is used
and it doesn't support [[:<:]] and [[:>:]].
I saw it was already fixed upstream:
https://savannah.gnu.org/bugs/?50705
https://savannah.gnu.org/bugs/?50714
http://git.savannah.gnu.org/cgit/nano.git/commit/configure.ac?id=8f2b5bbf3d1b23007aedc9f07f224da91f0ec479
http://git.savannah.gnu.org/cgit/nano.git/commit/configure.ac?id=cc91ee603c24429375ace5d4b55d85c396668c2e
The fix defines GNU_WORDBOUNDS when the bundled regex lib is used
so nano won't convert \< to [[:<:] and \> to [[:>:]] in fixbounds().
I got working nano by removing the \< to [[:<:]] ... reinplace from the
Makefile and applying the commits to configure.ac and regenerating it.
Patch for the port:
https://github.com/guyyur/freebsd-ports_patches/blob/master/editors_nano__bad_regex.patch
Thanks,
Guy
More information about the freebsd-ports
mailing list