Skip to content

shfmt

Installs shfmt, a shell parser, formatter, and interpreter, from a GitHub release binary.

Terminal window
zi for \
from'gh-r' \
sbin'**/sh* -> shfmt' \
@mvdan/sh
  • from'gh-r' — downloads the release archive from GitHub Releases.
  • sbin'**/sh* -> shfmt' — creates a shim named shfmt pointing to the binary matching **/sh* anywhere in the archive tree (requires zinit-annex-bin-gem-node).

The annex zdharma-continuum/zinit-annex-bin-gem-node must be loaded before this recipe.

Terminal window
# prerequisite — load once at the top of .zshrc
zinit light-mode for zdharma-continuum/zinit-annex-bin-gem-node
zi for \
from'gh-r' \
sbin'**/sh* -> shfmt' \
@mvdan/sh