Skip to content

Freed-Wu/zsh-help

Repository files navigation

zsh-help

pre-commit.ci status github/workflow

github/downloads github/downloads/latest github/issues github/issues-closed github/issues-pr github/issues-pr-closed github/discussions github/milestones github/forks github/stars github/watchers github/contributors github/commit-activity github/last-commit github/release-date

github/license github/languages github/languages/top github/directory-file-count github/code-size github/repo-size github/v

A zsh plugin to colorize XXX --help.

help

Dependencies

  • bat: this plugin will do nothing if bat is 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.

Similar Projects

  • manpager: colorize man XXX by export MANPAGER=manpager.
  • lesspipe: colorize less XXX by export LESSOPEN='|lesspipe.sh %s'.

Releases

No releases published

Packages

No packages published

Languages