misc.zsh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. # define pager dependant on what is available (less or more)
  20. if (( ${+commands[less]} )); then
  21. env_default 'PAGER' 'less'
  22. env_default 'LESS' '-R'
  23. elif (( ${+commands[more]} )); then
  24. env_default 'PAGER' 'more'
  25. fi
  26. ## super user alias
  27. alias _='sudo '
  28. ## more intelligent acking for ubuntu users and no alias for users without ack
  29. if (( $+commands[ack-grep] )); then
  30. alias afind='ack-grep -il'
  31. elif (( $+commands[ack] )); then
  32. alias afind='ack -il'
  33. fi