If I want to get a brief usage message for a bash builtin, I can use help <builtin>
at a command prompt, e.g.
$ help export
export: export [-fn] [name[=value] ...] or export -p
Set export attribute for shell variables.
Marks each NAME for automatic export to the environment of subsequently
executed commands. If VALUE is supplied, assign VALUE before exporting.
Options:
-f refer to shell functions
-n remove the export property from each NAME
-p display a list of all exported variables and functions
An argument of `--' disables further option processing.
Exit Status:
Returns success unless an invalid option is given or NAME is invalid.
How can I do this in zsh? I've tried
% export --help
zsh: bad option: -e
and
% help export
zsh: command not found: help
Also the word "help" isn't anywhere in man zshbuiltins
.
Best Answer
thanks to @don_crissti linking through this Arch wiki documentation.
For some reason the code on the Arch wiki causes this error on invocation
zsh --version => zsh 5.1.1 (x86_64-ubuntu-linux-gnu)
so to get it to work, I added the below block to
~/.zshrc
, then commented out the alias commands.and simply invoke with
So now I get