Created
April 28, 2022 04:33
-
-
Save lopesivan/f88a6d27f526d820db5f47179d08ff06 to your computer and use it in GitHub Desktop.
Um exemplo de como usar o less como pager com man
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
man(){ | |
env \ | |
PAGER=less \ | |
MANPAGER=less \ | |
LESS_TERMCAP_mb=$(tput bold; tput setaf 2) \ | |
LESS_TERMCAP_md=$(tput bold; tput setaf 6) \ | |
LESS_TERMCAP_me=$(tput sgr0) \ | |
LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) \ | |
LESS_TERMCAP_se=$(tput rmso; tput sgr0) \ | |
LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) \ | |
LESS_TERMCAP_ue=$(tput rmul; tput sgr0) \ | |
LESS_TERMCAP_mr=$(tput rev) \ | |
LESS_TERMCAP_mh=$(tput dim) \ | |
LESS_TERMCAP_ZN=$(tput ssubm) \ | |
LESS_TERMCAP_ZV=$(tput rsubm) \ | |
LESS_TERMCAP_ZO=$(tput ssupm) \ | |
LESS_TERMCAP_ZW=$(tput rsupm) \ | |
\man "$@" | |
} | |
man gcc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment