OpenBSD.zsh 971 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #
  2. # OpenBSD stuff
  3. #
  4. # GNU ls(1) from OpenBSD ports is named gls(1)/gdircolors(1).
  5. if -exe gls; then
  6. if [ "$TERM" != 'dumb' ]; then
  7. if -exe gdircolors; then
  8. if [ -r ~/.dircolors ]; then
  9. eval $(gdircolors -b ~/.dircolors)
  10. else
  11. eval $(gdircolors -b)
  12. fi
  13. fi
  14. alias ls='gls -h --color=auto'
  15. alias l='gls -lh --color=auto'
  16. else
  17. alias ls='gls -h'
  18. alias l='gls -lh'
  19. fi
  20. # colorls(1) is {Open,Net}BSD port name for FreeBSD ls(1)
  21. elif -exe colorls; then
  22. if [ "$TERM" != 'dumb' ]; then
  23. export LSCOLORS='exfxbxdxcxegedabagacad'
  24. alias ls='colorls -GFh'
  25. alias l='colorls -lGFh'
  26. else
  27. alias ls='colorls -Fh'
  28. alias l='colorls -lFh'
  29. fi
  30. else
  31. alias ls='ls -Fh'
  32. fi
  33. # GNU tar is called gtar
  34. if -exe gtar; then
  35. alias tar='gtar'
  36. fi
  37. # GNU find is called gfind
  38. if -exe gfind; then
  39. alias find='gfind'
  40. fi