summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2020-05-08 20:23:26 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2020-05-08 20:23:26 -0400
commit6d33a1d2f3c2d10dd906261f657fd576f8d61711 (patch)
tree79c624d670e0afbde30e28c83ae320b22c1e5e7b
parent0cf0e7dd87927b632749e62c80703592b962f569 (diff)
downloadzsh-6d33a1d2f3c2d10dd906261f657fd576f8d61711.tar.gz
zsh-6d33a1d2f3c2d10dd906261f657fd576f8d61711.tar.bz2
zsh-6d33a1d2f3c2d10dd906261f657fd576f8d61711.zip
Added colors to some commands.
-rw-r--r--zshrc.local41
1 files changed, 41 insertions, 0 deletions
diff --git a/zshrc.local b/zshrc.local
index d2a26fb..f1de0ca 100644
--- a/zshrc.local
+++ b/zshrc.local
@@ -4,6 +4,7 @@ bindkey -v
export BROWSER=firefox
export EDITOR=vim
export XKB_DEFAULT_VARIANT=dvorak
+export GTK_THEME=Arc-Dark
export GPG_TTY=$(tty)
gpg-connect-agent updatestartuptty /bye >/dev/null
@@ -43,3 +44,43 @@ compinit
bashcompinit
# Argcomplete explicit registration for pubs
eval "$(register-python-argcomplete pubs)"
+
+# Colors
+alias ip='ip -color=auto'
+alias diff='diff --color=auto'
+
+zmodload zsh/zpty
+
+pty() {
+ zpty pty-${UID} ${1+$@}
+ if [[ ! -t 1 ]];then
+ setopt local_traps
+ trap '' INT
+ fi
+ zpty -r pty-${UID}
+ zpty -d pty-${UID}
+}
+
+ptyless() {
+ pty $@ | less
+}
+
+man() {
+ LESS_TERMCAP_md=$'\e[01;31m' \
+ LESS_TERMCAP_me=$'\e[0m' \
+ LESS_TERMCAP_se=$'\e[0m' \
+ LESS_TERMCAP_so=$'\e[01;44;33m' \
+ LESS_TERMCAP_ue=$'\e[0m' \
+ LESS_TERMCAP_us=$'\e[01;32m' \
+ command man "$@"
+}
+
+export LESS=-R
+export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink
+export LESS_TERMCAP_md=$'\E[1;36m' # begin bold
+export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink
+export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video
+export LESS_TERMCAP_se=$'\E[0m' # reset reverse video
+export LESS_TERMCAP_us=$'\E[1;32m' # begin underline
+export LESS_TERMCAP_ue=$'\E[0m' # reset underline
+# and so on