tldr
簡化版 man pages,快速查詢命令用法
安裝
# macOS
brew install tldr
# npm
npm install -g tldr
# pip
pip install tldr
# Arch Linux
sudo pacman -S tldr基本用法
# 查詢命令
tldr tar
tldr git-commit
tldr docker-run
# 更新本地快取
tldr --update指定平台
# Linux 專用命令
tldr -p linux apt
# macOS 專用命令
tldr -p osx brew
# Windows 專用命令
tldr -p windows choco
# 通用命令
tldr -p common git輸出範例
$ tldr tar
tar
Archiving utility.
Often combined with a compression method, such as gzip or bzip2.
More information: https://www.gnu.org/software/tar
- [c]reate an archive and write it to a [f]ile:
tar cf target.tar file1 file2 file3
- [c]reate a g[z]ipped archive and write it to a [f]ile:
tar czf target.tar.gz file1 file2 file3
- E[x]tract a (compressed) archive [f]ile:
tar xf source.tar[.gz|.bz2|.xz]其他用戶端
tealdeer (Rust 實現)
更快速的替代品
# 安裝
brew install tealdeer
cargo install tealdeer
# 使用
tldr tar線上版本
貢獻頁面
tldr 是社群驅動的專案,可以貢獻新頁面:
- Fork tldr-pages/tldr
- 在
pages/目錄新增頁面 - 提交 Pull Request
頁面格式
# command-name
> Short description.
> More information: <https://example.com>.
- Description of first example:
`command --option`
- Description of second example:
`command --option {{argument}}`與 man 比較
| 特性 | tldr | man |
|---|---|---|
| 長度 | 簡短實用 | 完整詳細 |
| 範例 | 常見用法 | 較少 |
| 更新 | 社群維護 | 系統附帶 |
| 離線 | 需下載快取 | 已安裝 |