Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
23688fc7
Unverified
Commit
23688fc7
authored
Sep 29, 2018
by
Iulian Onofrei
Committed by
GitHub
Sep 29, 2018
Browse files
Add option to color any help command
This allows you to use `colored git log --help` for example, to get colored output.
parent
b4007b54
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/colored-man-pages/colored-man-pages.plugin.zsh
View file @
23688fc7
...
...
@@ -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