My dotfiles. Period.

global-before.bashrc 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. #######################################################
  3. ### things to do BEFORE host/user-specific settings ###
  4. #######################################################
  5. ### .... ###
  6. ### SUBZ ###
  7. ### '''' ###
  8. git() {
  9. if grep -Fwqse "$1" "$GIT_DISABLED_COMMANDS"; then
  10. echo "You don't want this." >&2
  11. return 1
  12. else
  13. command git "$@"
  14. fi
  15. }
  16. ### .... ###
  17. ### BASH ###
  18. ### '''' ###
  19. export HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups
  20. export HISTIGNORE=$HISTIGNORE:ls:ll:la:cd
  21. export HISTIGNORE="$HISTIGNORE:git ap:git cm:git cma:git dc:git st"
  22. export GLOBIGNORE=.:..
  23. # some more aliases
  24. alias ll='ls -lh'
  25. alias lla='ls -lha'
  26. alias open='gnome-open'
  27. alias diff='diff -u'
  28. alias pad4='sed -e "s/^/ /"'
  29. alias grepr='grep -nr . -e'
  30. alias sc='se --direction=encz.cz'
  31. ### ...... ###
  32. ### OTHERS ###
  33. ### '''''' ###
  34. export GREP_OPTIONS="--color --binary-files=without-match"
  35. # make green git bash trinket even cooler
  36. export GIT_PS1_SHOWDIRTYSTATE=true
  37. export GIT_PS1_SHOWUNTRACKEDFILES=true
  38. export GIT_DISABLED_COMMANDS="$HOME/.git-universe/disabled-commands"
  39. # disable mounting things like SFTP to ~/.gvfs when accessed
  40. # via GIO (used by nautilus etc.)
  41. export GVFS_DISABLE_FUSE=1
  42. # disable the terrible beep sound (only for X; for tty?, blacklist pcspkr)
  43. [[ ${!DISPLAY[@]} ]] && xset b off
  44. # get rid of those .pyc files once and for all
  45. export PYTHONDONTWRITEBYTECODE=1