Advertisement
Guest User

dircolors.sh

a guest
Sep 30th, 2021
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. term_supports_color() {
  2.     if test "$COLORTERM" = truecolor; then
  3.         return 0
  4.     fi
  5.     case "$TERM" in
  6.     *-color*|*-16color*|*-256color*|*-direct|linux|foot)
  7.         return 0 ;;
  8.     '')
  9.         return 1 ;;
  10.     esac
  11.     if command -v tput >/dev/null && test "$(tput colors)" -ge 8; then
  12.         return 0
  13.     fi
  14.     return 1
  15. }
  16.  
  17. if term_supports_color; then
  18.     export LS_COLORS='rs=0:ex=1;32:di=1;34:ln=31:pi=33:so=1;35:bd=1;36:cd=1;33:su=1;31:sg=1;31:*akefile=1;33'
  19. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement