When comparing zsh vs pkgsrc, the Slant community recommends zsh for most people. In the question“What are the best power user tools for macOS?” zsh is ranked 53rd while pkgsrc is ranked 62nd. The most important reason people chose zsh is:
When you start typing a command, you can press the tab key and it will complete the command you started typing. If there are multiple potential commands, you can choose which one to run by simply pressing tab again. Case-insensitive by default, too.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Interactive autocompletion
When you start typing a command, you can press the tab key and it will complete the command you started typing. If there are multiple potential commands, you can choose which one to run by simply pressing tab again. Case-insensitive by default, too.
Pro Powerful community-driven tools via oh-my-zsh
Oh-my-zsh is a community-driven framework, which helps users with their zsh configuration and plugins. 400 plugins, 200+ themes and auto-updates to always be up to date.
Pro Autocomplete for options
Zsh intelligently determines if you are trying to complete a file path or an option, and pressing tab after typing -
will reliably bring up a list of options.
Pro Good bash compatibility
Things you've learned using bash will largely apply to zsh. Scripts written in bash will run with little to no modification.
Pro Safer variable behaviour
Unlike Bash, zsh does not split unquoted variables by default, making it less error-prone.
Pro Recursive globbing
ls **/*.log
for example is supported by ZSH.
Pro Great install procedure
Zsh will take you through a procedure which is roughly 30 minutes in length before during install. Through this procedure it asks you to set different options and customize the shell the way you want it to. Most of these settings are also found in other shells, but to customize them you have to go dig configuration files while zsh allows you to do it in the beginning.
Pro Shared histories
If you spend a lot of time in the terminal, most likely you will have several terminal windows open. Zsh has great support for command line histories. The history is unique and shared through all the different instances.
Pro Smart escaping
Zsh can determine the context of the command you're typing in and determine if it should escape characters if you're typing in a URI.
Pro Pipe output to a temporary file:
Some programs don't support loading from stdin, but ZSH can store outputs to a temporary file, example: unzip =(curl http://example.com/someZipFile.zip)
Pro Faster spelling correction
Zsh' s correct (or correctall) is vastly superior to Bash's attempt at spelling correction.
Pro pkgin is an apt-like tools for installing binaries from pkgsrc
pkgin aims to be a tool similar to apt/yum for managing pkgsrc binaries by relying on pkg_summary for installing, removing and upgrading packages and dependencies, using a remote repo.
Pro Adapted for use on over a dozen different operating systems
Has been adopted to be used on several Unix-like operating systems and Windows. It's also the default package manager of DragonflyBSD and of the (now discounted) Bluewall Linux distro.
Pro Installs and works in the same way as MacPorts
Installs its own dependencies which means that it is very secure. Cannot install anything unless you use the "sudo" command which is in keeping with the Unix philosophy.
Pro Both binary packages and source build possible
Fast software installation is possible by using binary packages. It's also easy to build from source which allows for different compile-time options (like different UI backends) as well as gaining access to pre-release versions of software in certain cases.
Pro Offering tooling for backporting fixes
Backporting fixes can be done by cherry-picking updates from a newer branch (pkgsrc is released every 3 months) and creating a package. Sometimes bugs need to be fixed for production and there is neither a fix in newer pkgsrc nor the softwares upstream. So pkgsrc has tools like pkgdiff, mkpatches, etc. that help with developing patches and building binary packages from that. A bit of documentation about that process can be found here.
Pro Does not need Xcode command line tools or Xcode.
This means that you can install it fresh on a new installation of MacOS and have all your favorite apps installed right from the start.
Pro Works easily with Ansible
Can be used from within Ansible to install packages on macOS.
Pro Easy installation if you use 3rd party scripts
This one works brilliantly.
Cons
Con Not fully compatible with bash
There is a small chance you may have a bash script that doesn't work in zsh, although this is very very rare and most developers will never run into any issues.
Con Requires a lot of configuration to be used fully
Zsh requires a lot of tinkering with configuration files and downloading plugins in order to be able to do tasks which other shells may be able to do out of the box.
Con Defaults are unfriendly for a long-time bash user
Expect to find a configuration you like (or use the configuration utility) to set reasonable preferences. Default zsh interaction is different enough to make you stutter through what used to be familiar workflows.
Con Relatively complicated setup and installation
Installing and setting pkgsrc up is a bit more complicated than in other package managers where it often consists in running a single script.
Con Not so broadly used on MacOS as compared with MacPorts
You do not hear about Pkgsrc as openly as you hear the words "HomeBrew" or "MacPorts".
Con Outdated packages
Some packages are outdated.
Con Can't install some packages
Even building well known packages (except MacPorts) from source using the ports can fail.