misc.zsh 880 B

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