.bashrc 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # bashrc for dak user
  2. # If not running interactively, don't do anything
  3. [ -z "$PS1" ] && return
  4. # append to the history file, don't overwrite it
  5. shopt -s histappend
  6. export HISTCONTROL=ignoreboth
  7. # check the window size after each command and, if necessary,
  8. # update the values of LINES and COLUMNS.
  9. shopt -s checkwinsize
  10. # make less more friendly for non-text input files, see lesspipe(1)
  11. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  12. ## A little nice prompt.
  13. PS1='`_ret=$?; if test $_ret -ne 0; then echo "\[\033[01;31m\]$_ret "; set ?=$_ret; unset _ret; fi`\[\033[01;33m\][`git branch 2>/dev/null|cut -f2 -d\* -s` ] \[\033[01;32m\]\u@\[\033[00;36m\]\h\[\033[01m\]:\[\033[00;37m\]\w\[\033[00m\]\$ '
  14. # If this is an xterm set the title to user@host:dir
  15. case "$TERM" in
  16. xterm*|rxvt*)
  17. PS1="\[\e]0;\u@\h: \w\a\]$PS1"
  18. ;;
  19. *)
  20. ;;
  21. esac
  22. case "$HOSTNAME" in
  23. franck|coccia|fasolo)
  24. export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
  25. ;;
  26. seger)
  27. export SCRIPTVARS=/srv/security-master.debian.org/dak/config/debian-security/vars
  28. ;;
  29. *)
  30. echo "Unconfigured dak host, not importing the usual vars"
  31. ;;
  32. esac
  33. if [[ -n ${SCRIPTVARS} ]]; then
  34. . $SCRIPTVARS
  35. fi
  36. function evim() {
  37. export EDITOR=vim
  38. }
  39. export PAGER=less
  40. export LESS="-X"
  41. export EDITOR=emacs
  42. export HISTFILESIZE=6000
  43. export CDPATH=".:~:${base}:${public}:${queuedir}"
  44. export PATH="~/bin/:${PATH}"
  45. alias base='cd ${base}'
  46. alias config='cd ${configdir}'
  47. alias ls='ls --color=auto'
  48. alias sshx='ssh -O exit'
  49. alias killsync='ssh -O exit upload-master'