OpenBSD.zsh 875 B

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