how2 plugin
July 7, 2026 · View on GitHub
Quickly inspect aliases, functions, and docs of oh-my-zsh plugins, with Tab completion.
Setup
Add how2 to the plugins array in your .zshrc:
plugins=(... how2)
Installation
Option 1: Git clone (recommended)
git clone https://github.com/yizhixiaokong/how2 ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/how2
Then add how2 to your plugins in ~/.zshrc:
plugins=(... how2)
Finally, restart your shell or run:
source ~/.zshrc
Option 2: Manual download
mkdir -p ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/how2
Download the following files into that directory:
how2.plugin.zsh_how2
Then add how2 to your ~/.zshrc plugins array and restart your shell.
Commands
| Command | Description |
|---|---|
how2 <plugin> | Pretty-print all aliases defined by a plugin |
how2f <plugin> | List all functions defined by a plugin |
how2d <plugin> | View the plugin's README documentation |
💡 All three commands support Tab completion for plugin names — no need to remember them.
how2d auto-selects the best available renderer:
| Priority | Tool | Notes |
|---|---|---|
| 1 | glow | Terminal Markdown renderer — best visuals |
| 2 | batcat / bat | cat with syntax highlighting (Debian uses batcat) |
| 3 | less | Plain text fallback |
Examples
how2 git # What aliases does the git plugin define?
how2 docker # What aliases does the docker plugin define?
how2f extract # What functions does the extract plugin define?
how2d sudo # Open the sudo plugin's README
File structure
custom/plugins/how2/
├── _how2 # Tab completion definition
├── how2.plugin.zsh # Plugin logic
└── README.md # This document (English)
└── README_zh.md # 中文文档