misc.zsh 951 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. env_default 'PAGER' 'less'
  20. env_default 'LESS' '-R'
  21. ## super user alias
  22. alias _='sudo'
  23. alias please='sudo'
  24. ## more intelligent acking for ubuntu users
  25. if which ack-grep &> /dev/null; then
  26. alias afind='ack-grep -il'
  27. else
  28. alias afind='ack -il'
  29. fi
  30. # only define LC_CTYPE if undefined
  31. if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
  32. export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG
  33. fi
  34. # recognize comments
  35. setopt interactivecomments