OpenBSD.zsh 875 B

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