misc.zsh 935 B

123456789101112131415161718192021222324252627282930313233
  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. setopt multios # enable redirect to multiple streams: echo >file1 >file2
  17. setopt long_list_jobs # show long list format job notifications
  18. setopt interactivecomments # recognize comments
  19. env_default 'PAGER' 'less'
  20. env_default 'LESS' '-R'
  21. ## super user alias
  22. alias _='sudo '
  23. ## more intelligent acking for ubuntu users and no alias for users without ack
  24. if (( $+commands[ack-grep] )); then
  25. alias afind='ack-grep -il'
  26. elif (( $+commands[ack] )); then
  27. alias afind='ack -il'
  28. fi