mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-10-02 16:03:47 +02:00
Add option to color any help command
This allows you to use `colored git log --help` for example, to get colored output.
This commit is contained in:
1 parent
b4007b5400
commit
23688fc7ab
1 file changed
+6
-2
@@ -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 "$@"
|
||||
}
|
||||
Reference in new issue
Block a user