misc.zsh 780 B

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