You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.3 KiB

16 years ago
16 years ago
16 years ago
16 years ago
  1. #!/bin/bash -x
  2. echo "loading .bashrc" >&2
  3. # $HOME/bin
  4. #
  5. if [ ! -d "$HOME/bin" ]; then
  6. set -x
  7. mkdir "$HOME/bin"
  8. if [ "$PATH" == "${PATH//$HOME\/bin/}" ]; then
  9. export PATH="$HOME/bin:$PATH"
  10. fi
  11. set +x
  12. fi
  13. # GPG
  14. #
  15. if [ ! -x "$(type -p gpg-agent)" ]; then
  16. :
  17. elif test -f "$HOME/.gpg-agent-info" &&
  18. kill -0 $(cut -d: -f2 "$HOME/.gpg-agent-info" 2> /dev/null ) 2> /dev/null; then
  19. . "$HOME/.gpg-agent-info"
  20. export GPG_TTY=$(tty)
  21. else
  22. eval $(gpg-agent --daemon --log-file "$HOME/.gpg-agent.log" \
  23. --write-env-file "$HOME/.gpg-agent-info" 2> /dev/null)
  24. export GPG_TTY=$(tty)
  25. fi
  26. # ssh wrapper
  27. #
  28. if [ -x $HOME/bin/ssh ]; then
  29. export CVS_SSH="$HOME/bin/ssh"
  30. export SVN_SSH="$HOME/bin/ssh"
  31. export GIT_SSH="$HOME/bin/ssh"
  32. else
  33. export CVS_RSH=ssh
  34. fi
  35. # other apps chosen by env
  36. #
  37. export BROWSER=links
  38. export EDITOR=vim
  39. # tweak your bash
  40. #
  41. export HISTFILESIZE=50
  42. export HISTCONTROL=ignoredups
  43. # interactive prompt
  44. if [ -n "$PS1" ]; then
  45. echo "TERM:$TERM"
  46. # support resize, please
  47. shopt -s checkwinsize
  48. # get a good $PS1
  49. [ -s $HOME/.bash/prompt.in ] && . $HOME/.bash/prompt.in
  50. # aliases
  51. #
  52. alias ls='ls --color=auto'
  53. alias l='ls -avhlF'
  54. [ "$(type -t ll)" = alias ] && unalias ll
  55. function ll() { ls -avhlF $* | less; }
  56. fi
  57. # local settings
  58. [ -f $HOME/.bash/local.in ] && . $HOME/.bash/local.in