Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
2156b4c0
Unverified
Commit
2156b4c0
authored
Aug 07, 2019
by
Marc Cornellà
Committed by
GitHub
Aug 07, 2019
Browse files
Options
Browse Files
Download
Plain Diff
colored-man-pages: add option to color any help command (#7173)
This allows you to use `colored git log --help` for example, to get colored output.
parents
89366be4
26aad597
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
README.md
plugins/colored-man-pages/README.md
+15
-0
colored-man-pages.plugin.zsh
plugins/colored-man-pages/colored-man-pages.plugin.zsh
+6
-2
No files found.
plugins/colored-man-pages/README.md
0 → 100644
View file @
2156b4c0
# Colored man pages plugin
This plugin adds colors to man pages.
To use it, add
`colored-man-pages`
to the plugins array in your zshrc file:
```
zsh
plugins
=(
... colored-man-pages
)
```
You can also try to color other pages by prefixing the respective command with
`colored`
:
```
zsh
colored git
help
clone
```
plugins/colored-man-pages/colored-man-pages.plugin.zsh
View file @
2156b4c0
...
...
@@ -16,7 +16,7 @@ EOF
fi
fi
function
man
()
{
function
colored
()
{
env
\
LESS_TERMCAP_mb
=
$(
printf
"
\e
[1;31m"
)
\
LESS_TERMCAP_md
=
$(
printf
"
\e
[1;31m"
)
\
...
...
@@ -28,5 +28,9 @@ function man() {
PAGER
=
"
${
commands
[less]
:-
$PAGER
}
"
\
_NROFF_U
=
1
\
PATH
=
"
$HOME
/bin:
$PATH
"
\
man
"
$@
"
"
$@
"
}
function
man
()
{
colored man
"
$@
"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment