misc.zsh 743 B

1234567891011121314151617181920212223242526272829
  1. ## smart urls
  2. autoload -U url-quote-magic
  3. zle -N self-insert url-quote-magic
  4. ## jobs
  5. setopt long_list_jobs
  6. ## pager
  7. export PAGER="less"
  8. export LESS="-R"
  9. ## super user alias
  10. alias _='sudo'
  11. alias please='sudo'
  12. ## more intelligent acking for ubuntu users
  13. alias afind='ack-grep -il'
  14. ## how to interpret text characters
  15. if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then # only define if undefined
  16. export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG
  17. [[ -z "$LC_CTYPE" ]] && \
  18. export LC_CTYPE=`locale -a | grep en_US.utf8 | head -1`
  19. [[ -z "$LC_CTYPE" ]] && \
  20. export LC_CTYPE=`locale -a | grep en_US | head -1`
  21. [[ -z "$LC_CTYPE" ]] && \
  22. export LC_CTYPE=C # default to internal encoding.
  23. fi