misc.zsh 946 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ## Load smart urls if available
  2. # bracketed-paste-magic is known buggy in zsh 5.1.1 (only), so skip it there; see #4434
  3. autoload -Uz is-at-least
  4. if [[ $ZSH_VERSION != 5.1.1 ]]; then
  5. for d in $fpath; do
  6. if [[ -e "$d/url-quote-magic" ]]; then
  7. if is-at-least 5.1; then
  8. autoload -Uz bracketed-paste-magic
  9. zle -N bracketed-paste bracketed-paste-magic
  10. fi
  11. autoload -Uz url-quote-magic
  12. zle -N self-insert url-quote-magic
  13. break
  14. fi
  15. done
  16. fi
  17. ## jobs
  18. setopt long_list_jobs
  19. ## pager
  20. export PAGER="less"
  21. export LESS="-R"
  22. ## super user alias
  23. alias _='sudo'
  24. alias please='sudo'
  25. ## more intelligent acking for ubuntu users
  26. if which ack-grep &> /dev/null; then
  27. alias afind='ack-grep -il'
  28. else
  29. alias afind='ack -il'
  30. fi
  31. # only define LC_CTYPE if undefined
  32. if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
  33. export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG
  34. fi
  35. # recognize comments
  36. setopt interactivecomments