This is a snippet for zsh
you can add to a .zshrc
to automatically open manpages in Dash if and only if the "Manpages" DocSet is installed. It's been tested with macOS Sequoia (v15.5).
It uses the omz_urlencode
function provided by oh-my-zsh.
If you don't have oh-my-zsh
installed, you can paste this into your .zshrc
as a reasonable substitution:
omz_urlencode() {
local string="${@}"
local strlen=${#string}