Browse Source

Config: Add color to diff, ls and tree output

master
Riyyi 3 years ago
parent
commit
31a4b329e7
  1. 3
      .config/zsh/.zprofile
  2. 3
      .config/zsh/.zshrc

3
.config/zsh/.zprofile

@ -48,6 +48,9 @@ export LESS_TERMCAP_se="$(printf '%b' '\e[0m')" # reset reverse video
export LESS_TERMCAP_us="$(printf '%b' '\e[04;95m')" # begin underline export LESS_TERMCAP_us="$(printf '%b' '\e[04;95m')" # begin underline
export LESS_TERMCAP_ue="$(printf '%b' '\e[0m')" # reset underline export LESS_TERMCAP_ue="$(printf '%b' '\e[0m')" # reset underline
# ls (LS_COLORS)
eval "$(dircolors -b)"
# Make # Make
export MAKEFLAGS="-j $(getconf _NPROCESSORS_ONLN)" export MAKEFLAGS="-j $(getconf _NPROCESSORS_ONLN)"

3
.config/zsh/.zshrc

@ -89,6 +89,7 @@ alias ..3="cd ../../.."
alias ..4="cd ../../../.." alias ..4="cd ../../../.."
alias cp='cp -i' alias cp='cp -i'
alias df="df -h" alias df="df -h"
alias diff="diff --color"
alias du="du -h" alias du="du -h"
alias e="aliases emacs" alias e="aliases emacs"
alias emacs="aliases emacs" alias emacs="aliases emacs"
@ -96,7 +97,7 @@ alias fuck='sudo $(fc -ln -1)'
alias grep="grep --color=always" alias grep="grep --color=always"
alias ip="ip --color" alias ip="ip --color"
alias ipb="ip --color --brief a" alias ipb="ip --color --brief a"
alias l.="\ls -lAGh --color --group-directories-first | awk -v r='^(.*m)?\\\.' '{ if (\$8 ~ r) print; }'" alias l.="\ls -lAGh --color --group-directories-first | awk '{ if (\$NF ~ /^(.*m)?\./) print }'"
alias la="\ls -lAGh --color --group-directories-first" alias la="\ls -lAGh --color --group-directories-first"
alias less="less -x 4" alias less="less -x 4"
alias ls="ls --color --group-directories-first" alias ls="ls --color --group-directories-first"

Loading…
Cancel
Save