OpenBSD.zsh 779 B

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