misc.zsh 809 B

1234567891011121314151617181920212223242526272829303132333435
  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 and no alias for users without ack
  23. if (( $+commands[ack-grep] )); then
  24. alias afind='ack-grep -il'
  25. elif (( $+commands[ack] )); then
  26. alias afind='ack -il'
  27. fi
  28. # recognize comments
  29. setopt interactivecomments