summaryrefslogtreecommitdiff
path: root/plugins/colored-man-pages
diff options
context:
space:
mode:
authorFelix Stupp <felix.stupp@outlook.com>2020-03-30 18:13:12 +0000
committerGitHub <noreply@github.com>2020-03-30 20:13:12 +0200
commit621de1e20bbe97dc6d867be47b8e797280bb079c (patch)
tree91e24c058e89db4229a25955888b717505477760 /plugins/colored-man-pages
parent2a081d6e5e39887dc6b051fdcddfc9cb39aa856f (diff)
downloadzsh-621de1e20bbe97dc6d867be47b8e797280bb079c.tar.gz
zsh-621de1e20bbe97dc6d867be47b8e797280bb079c.tar.bz2
zsh-621de1e20bbe97dc6d867be47b8e797280bb079c.zip
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>
Diffstat (limited to 'plugins/colored-man-pages')
-rw-r--r--plugins/colored-man-pages/README.md3
-rw-r--r--plugins/colored-man-pages/colored-man-pages.plugin.zsh7
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/colored-man-pages/README.md b/plugins/colored-man-pages/README.md
index d9f6acb2a..f34941e73 100644
--- a/plugins/colored-man-pages/README.md
+++ b/plugins/colored-man-pages/README.md
@@ -8,6 +8,9 @@ To use it, add `colored-man-pages` to the plugins array in your zshrc file:
plugins=(... colored-man-pages)
```
+It will also automatically colorize man pages displayed by `dman` or `debman`,
+from [`debian-goodies`](https://packages.debian.org/stable/debian-goodies).
+
You can also try to color other pages by prefixing the respective command with `colored`:
```zsh
diff --git a/plugins/colored-man-pages/colored-man-pages.plugin.zsh b/plugins/colored-man-pages/colored-man-pages.plugin.zsh
index f74105d40..ec518472c 100644
--- a/plugins/colored-man-pages/colored-man-pages.plugin.zsh
+++ b/plugins/colored-man-pages/colored-man-pages.plugin.zsh
@@ -31,6 +31,9 @@ function colored() {
"$@"
}
-function man() {
- colored man "$@"
+# Colorize man and dman/debman (from debian-goodies)
+function man \
+ dman \
+ debman {
+ colored $0 "$@"
}