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.

102 lines
1.8 KiB

16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
  1. # ~/.bashrc: executed by bash(1) for non-login shells.
  2. export LANG="en_GB.UTF-8"
  3. # If not running interactively, don't do anything
  4. [ -z "$PS1" ] && return
  5. # GPG
  6. #
  7. x="$HOME/.gpg-agent-info"
  8. if ! type -p gpg-agent > /dev/null; then
  9. rm -f "$x"
  10. elif test -s "$x" &&
  11. kill -0 $(cut -d: -f2 "$x" 2> /dev/null ) 2> /dev/null; then
  12. . "$x"
  13. else
  14. eval $(gpg-agent --daemon --log-file "$HOME/.gpg-agent.log" \
  15. --write-env-file "$x" 2> /dev/null)
  16. fi
  17. if [ -s "$x" ]; then
  18. export GPG_TTY=$(tty)
  19. eval export $(cut -d= -f1 "$x")
  20. fi
  21. unset x
  22. # ssh wrapper
  23. #
  24. if [ -s "$HOME/bin/ssh" ]; then
  25. SSH="$HOME/bin/ssh"
  26. else
  27. SSH=ssh
  28. fi
  29. for x in GIT_SSH; do
  30. eval export $x=$SSH
  31. done
  32. # debian/ubuntu development
  33. #
  34. export DEBFULLNAME="Alejandro Mery"
  35. export DEBEMAIL="amery@geeks.cl"
  36. # other apps chosen by env
  37. #
  38. export BROWSER=links
  39. export EDITOR=vim
  40. # better utf-8 support
  41. export LESSCHARSET=utf-8
  42. # don't put duplicate lines in the history. See bash(1) for more options
  43. # ... or force ignoredups and ignorespace
  44. HISTCONTROL=ignoredups:ignorespace
  45. # append to the history file, don't overwrite it
  46. shopt -s histappend
  47. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  48. HISTSIZE=1000
  49. HISTFILESIZE=2000
  50. # support resize, please
  51. shopt -s checkwinsize
  52. # standarise $TERM
  53. case "$TERM" in
  54. nxterm)
  55. export TERM=xterm
  56. ;;
  57. screen-256color|screen|xterm|rxvt|linux)
  58. ;;
  59. *)
  60. echo "$TERM: Unknown TERM value."
  61. ;;
  62. esac
  63. # get a nicer $PS1
  64. [ -s $HOME/.bash/prompt.in ] && . $HOME/.bash/prompt.in
  65. # aliases
  66. #
  67. alias ls='ls --color=auto'
  68. alias l='ls -avhlF'
  69. alias gdb='gdb -quiet'
  70. alias vi='vi "+set encoding=utf-8"'
  71. [ "$(type -t ll)" = alias ] && unalias ll
  72. function ll() { ls -avhlF $* | less; }
  73. # vi mode
  74. set -o vi
  75. # local settings
  76. for x in .bash/local.in /etc/bash_completion; do
  77. expr "$x" : / > /dev/null || x="$HOME/$x"
  78. if [ -s "$x" ]; then
  79. . "$x"
  80. fi
  81. done