Skip to content

Commit

Permalink
colorized-man-pages: add hooks for dman and debman commands (ohmyzsh#…
Browse files Browse the repository at this point in the history
…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à <[email protected]>
  • Loading branch information
Zocker1999NET and mcornella authored Mar 30, 2020
1 parent 2a081d6 commit 621de1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions plugins/colored-man-pages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions plugins/colored-man-pages/colored-man-pages.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ function colored() {
"$@"
}

function man() {
colored man "$@"
# Colorize man and dman/debman (from debian-goodies)
function man \
dman \
debman {
colored $0 "$@"
}

0 comments on commit 621de1e

Please sign in to comment.