Skip to content

Dependence on PCRE causes warnings on FreeBSD, DragonFlyBSD #29

@dancrossnyc

Description

@dancrossnyc

The use of rematchpcre forces a dependency on PCRE, which is not enabled in the binaries distributed via the packaged version of zsh on either FreeBSD or DragonFlyBSD. This, unfortunately, causes an error on each keystroke:

term% zsh --version
zsh 5.9 (amd64-portbld-freebsd14.2)
term% uname -a
FreeBSD term 14.3-RELEASE FreeBSD 14.3-RELEASE releng/14.3-n271432-8c9ce319fef7 GENERIC amd64
: agni; source $HOME/.local/share/zsh-helix-mode/zsh-helix-mode.plugin.zsh
: agni; __zhm_find_line_start:4: failed to load module `zsh/pcre': Cannot open "/usr/local/lib/zsh/5.9/zsh/pcre.so"
__zhm_find_line_start:4: -pcre-match not available for regex
e__zhm_find_line_start:4: failed to load module `zsh/pcre': Cannot open "/usr/local/lib/zsh/5.9/zsh/pcre.so"
__zhm_find_line_start:4: -pcre-match not available for regex
ec__zhm_find_line_start:4: failed to load module `zsh/pcre': Cannot open "/usr/local/lib/zsh/5.9/zsh/pcre.so"
__zhm_find_line_start:4: -pcre-match not available for regex
h__zhm_find_line_start:4: failed to load module `zsh/pcre': Cannot open "/usr/local/lib/zsh/5.9/zsh/pcre.so"
__zhm_find_line_start:4: -pcre-match not available for regex
o__zhm_find_line_start:4: failed to load module `zsh/pcre': Cannot open "/usr/local/lib/zsh/5.9/zsh/pcre.so"
__zhm_find_line_start:4: -pcre-match not available for regex
 __zhm_find_line_start:4: failed to load module `zsh/pcre': Cannot open "/usr/local/lib/zsh/5.9/zsh/pcre.so"
__zhm_find_line_start:4: -pcre-match not available for regex
h__zhm_find_line_start:4: failed to load module `zsh/pcre': Cannot open "/usr/local/lib/zsh/5.9/zsh/pcre.so"
__zhm_find_line_start:4: -pcre-match not available for regex
i
hi
term% 

zsh on FreeBSD can be built from the ports collection with a PCRE configuration option that does the expected thing, but relying on packages to keep it up to date is going to be a chore.

It seems like the most straight-forward way to address this would be to switch to using POSIX extended regular expressions, and eschew the rematchpcre option, but given some of the REs in use, I'm not sure how reasonable that is; things like \A and \z have no analogue in EREs, and it's not immediately clear whether ^ and $ would serve as acceptable substitutes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions