OpenBSD.zsh 843 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. eval $(gdircolors -b)
  9. fi
  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 -exe 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. if -exe gtar; then
  31. alias tar='gtar'
  32. fi
  33. # GNU find is called gfind
  34. if -exe gfind; then
  35. alias find='gfind'
  36. fi