https://github.com/freed-wu/zsh-help
A zsh plugin to colorize `XXX --help`.
https://github.com/freed-wu/zsh-help
bat color command-line-tool help man zsh
Last synced: 5 months ago
JSON representation
A zsh plugin to colorize `XXX --help`.
- Host: GitHub
- URL: https://github.com/freed-wu/zsh-help
- Owner: Freed-Wu
- License: gpl-3.0
- Created: 2023-07-11T15:12:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-05T18:18:25.000Z (5 months ago)
- Last Synced: 2025-05-05T19:39:32.287Z (5 months ago)
- Topics: bat, color, command-line-tool, help, man, zsh
- Language: Shell
- Homepage:
- Size: 25.4 KB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zsh-help
[](https://results.pre-commit.ci/latest/github/Freed-Wu/zsh-help/main)
[](https://github.com/Freed-Wu/zsh-help/actions)[](https://github.com/Freed-Wu/zsh-help/releases)
[](https://github.com/Freed-Wu/zsh-help/releases/latest)
[](https://github.com/Freed-Wu/zsh-help/issues)
[](https://github.com/Freed-Wu/zsh-help/issues?q=is%3Aissue+is%3Aclosed)
[](https://github.com/Freed-Wu/zsh-help/pulls)
[](https://github.com/Freed-Wu/zsh-help/pulls?q=is%3Apr+is%3Aclosed)
[](https://github.com/Freed-Wu/zsh-help/discussions)
[](https://github.com/Freed-Wu/zsh-help/milestones)
[](https://github.com/Freed-Wu/zsh-help/network/members)
[](https://github.com/Freed-Wu/zsh-help/stargazers)
[](https://github.com/Freed-Wu/zsh-help/watchers)
[](https://github.com/Freed-Wu/zsh-help/graphs/contributors)
[](https://github.com/Freed-Wu/zsh-help/graphs/commit-activity)
[](https://github.com/Freed-Wu/zsh-help/commits)
[](https://github.com/Freed-Wu/zsh-help/releases/latest)[](https://github.com/Freed-Wu/zsh-help/blob/main/LICENSE)
[](https://github.com/Freed-Wu/zsh-help)
[](https://github.com/Freed-Wu/zsh-help)
[](https://github.com/Freed-Wu/zsh-help)
[](https://github.com/Freed-Wu/zsh-help)
[](https://github.com/Freed-Wu/zsh-help)
[](https://github.com/Freed-Wu/zsh-help)A zsh plugin to colorize `XXX --help`.

## Dependencies
- [bat](https://github.com/sharkdp/bat): this plugin will do nothing if `bat`
is not installed.## Install
This plugin respects
[zsh plugin standard](https://github.com/zdharma-continuum/Zsh-100-Commits-Club/blob/master/Zsh-Plugin-Standard.adoc),
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:```zsh
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:```zsh
-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`.
## Similar Projects
- [manpager](https://github.com/Freed-Wu/manpager): colorize `man XXX` by
`export MANPAGER=manpager`.
- [lesspipe](https://github.com/wofr06/lesspipe): colorize `less XXX` by
`export LESSOPEN='|lesspipe.sh %s'`.