zsh-help
July 17, 2023 ยท View on GitHub
A zsh plugin to colorize XXX --help.
Dependencies
- bat: this plugin will do nothing if
batis not installed.
Install
This plugin respects zsh plugin standard, so if you use any plugin manager and follow the instructions of your plugin manager, it can be installed correctly.
Customize
Colorize More Options
By default, the plugin colorizes --help, -?, --help-all, etc. You can
customize it to colorize more options like:
alias -g -- '-h=-h | -help'
Because many software use -h to represent --human-readable, --hex, etc.
not --help, this plugin doesn't colorize -h by default.
Function -help()
You can redefine function -help() to customize the colorization.
Such as:
-help() {
bat -plhelp --paging=always --color=always
}
will use a pager like less to display XXX --help. More options can be
found by bat --help.
Force to Colorize
You can XXX -h | -help to force to colorize XXX -h.