浏览代码

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>
Felix Stupp 4 年之前
父节点
当前提交
621de1e20b
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 3 0
      plugins/colored-man-pages/README.md
  2. 5 2
      plugins/colored-man-pages/colored-man-pages.plugin.zsh

+ 3 - 0
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

+ 5 - 2
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 "$@"
 }