Date: Thu, 6 Apr 2017 22:34:45 +0300 From: Guy Yur <guyyur@gmail.com> To: freebsd-ports@freebsd.org, danilo@freebsd.org Subject: nano 2.8.0 reports bad regex when including nanorc files Message-ID: <CAC67Hz8peVV8pD3Qh5Sx5hW6YGb367sBafTFdCi5=huT=%2B2CfQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC67Hz8peVV8pD3Qh5Sx5hW6YGb367sBafTFdCi5=huT=%2B2CfQ>