colorized-man-pages: add hooks for dman and debman commands (#8776)
* colorized-man-pages: Added hooks for commands dman and debman
`dman` and `debman` are tools from the package `debian-goodies` for
Debian systems (see https://packages.debian.org/stable/debian-goodies).
They can display man pages from manpages.debian.org or local debian
packages respectively.
README of the plugin is also updated.
* Simplify syntax for future changes
* Fix README syntax
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
Diff
1diff --git a/plugins/colored-man-pages/README.md b/plugins/colored-man-pages/README.md
2index d9f6acb2a0fa1dcf8495f40ce0e6c612c3b294ba..f34941e732102aa414b85aa6e8b9ba176e89fd29 100644
3--- a/plugins/colored-man-pages/README.md
4+++ b/plugins/colored-man-pages/README.md
5@@ -8,6 +8,9 @@ To use it, add `colored-man-pages` to the plugins array in your zshrc file:
6 plugins=(... colored-man-pages)
7 ```
8 9+It will also automatically colorize man pages displayed by `dman` or `debman`,
10+from [`debian-goodies`](https://packages.debian.org/stable/debian-goodies).
11+
12 You can also try to color other pages by prefixing the respective command with `colored`:
1314 ```zsh
15diff --git a/plugins/colored-man-pages/colored-man-pages.plugin.zsh b/plugins/colored-man-pages/colored-man-pages.plugin.zsh
16index f74105d409d14eae55812b9a19497c90b9558d4d..ec518472c8c6035adef0f8e9d6c4fbed8a34e80c 100644
17--- a/plugins/colored-man-pages/colored-man-pages.plugin.zsh
18+++ b/plugins/colored-man-pages/colored-man-pages.plugin.zsh
19@@ -31,6 +31,9 @@ function colored() {
20 "$@"
21 }
2223-function man() {
24- colored man "$@"
25+# Colorize man and dman/debman (from debian-goodies)
26+function man \
27+ dman \
28+ debman {
29+ colored $0 "$@"
30 }