I am trying to learn more about ZSH and the way that my shell is setup and operates. I am running OSX and have installed ZSH with HomeBrew so as not to use my standard system ZSH.

However, before running brew install zsh, I ran brew info zsh and found that there are two build options which are confusing to me.

  1. --with-gdbm-support

While I can find information about what GDBM is, I can't seem to find any practical applications or any reasoning about why I'd want to support it.

  1. --with-pcre-support

I'm familiar with what PCRE stands for, but I guess I'm left wondering, does ZSH use a different regexp engine without this option? So again, I'm wondering why I'd want to add PCRE support.

Any explanation of what these options would get me and why I'd want to use them would be much appreciated.


The documentation in the INSTALL at github includes the following note(s):


Zsh has a module which allows the pcre regular expression library to be used via shell builtins. Compiling this library into the shell with dynamic loading (the default where available) produces a dependency on the library libpcre.so. This is a problem on systems where zsh needs to be available at boot before the directory containing libpcre.so (for example /usr/lib or /usr/local/lib) is mounted. For this reason, pcre support will only be searched for if the option --enable-pcre is passed to configure.

So the option is controlling whether your zsh will function as a "system" level shell that can operate without external dependencies (such as the lib folder being unmounted).

As for the gdbm Module the documentation indicates

The zsh/db/gdbm module is used to create "tied" associative arrays that interface to database files. If the GDBM interface is not available, the builtins defined by this module will report an error. This module is also intended as a prototype for creating additional database interfaces, so the ztie builtin may move to a more generic module in the future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.