Using zsh Modules
A lot of zsh
functionality is contained in loadable zsh
modules. I can’t cover all of the zsh
modules in this chapter, so let’s just look at some of the more useful ones.
First, let’s see which modules get loaded into a zsh
session by default:
ubuntu2404% zmodload
zsh/complete
zsh/computil
zsh/main
zsh/parameter
zsh/stat
zsh/terminfo
zsh/zle
zsh/zutil
ubuntu2404%
There are a lot more optional modules that you can load yourself by using the zmodload
command, as we’ll see next.
To read about all of the available zsh
modules, see the zshmodules
man page.
Now, let’s get a bit more specific by looking at the mathfunc
module.
Using the mathfunc Module
If you want to create some really fancy math scripts without having to use an external utility such as bc
, just load the mathfunc
module, like this:
ubuntu2404% zmodload zsh/mathfunc
ubuntu2404%
This module provides functions for trigonometry...