The aptly named.
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.

105 lines
2.6 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
  1. # Add home-dir bin for random scripts etc
  2. export PATH=$HOME/bin:$PATH
  3. # Vi keybindings or bust
  4. export EDITOR=vim
  5. set -o vi
  6. # If not running interactively, don't do anything
  7. [ -z "$PS1" ] && return
  8. export HISTCONTROL='ignoreboth'
  9. export HISTFILESIZE=2000000
  10. export HISTIGNORE='&:ls:exit'
  11. shopt -s histappend
  12. set cmdhist
  13. # shopt -s checkwinsize
  14. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  15. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  16. debian_chroot=$(cat /etc/debian_chroot)
  17. fi
  18. # set a fancy prompt (non-color, unless we know we "want" color)
  19. case "$TERM" in
  20. xterm-color) color_prompt=yes;;
  21. esac
  22. # Get our git stuff (TODO: Add to dotfiles install.sh)
  23. source ~/dotfiles/git-completion.sh
  24. source ~/dotfiles/git-prompt.sh
  25. force_color_prompt=yes
  26. # Prompt colors
  27. BGREEN='\[\033[1;32m\]'
  28. GREEN='\[\033[0;32m\]'
  29. BRED='\[\033[1;31m\]'
  30. RED='\[\033[0;31m\]'
  31. BBLUE='\[\033[1;34m\]'
  32. BLUE='\[\033[0;34m\]'
  33. BYELLOW='\[\033[1;33m'
  34. YELLOW='\[\033[0;33m'
  35. BMAGENTA='\[\033[1;35M'
  36. MAGENTA='\[\033[0;35M'
  37. BCYAN='\[\033[1;36m'
  38. CYAN='\[\033[0;36m'
  39. NORMAL='\[\033[00m\]'
  40. # Prompt vars
  41. TIME="\@"
  42. HOST="\h"
  43. USER="\u"
  44. CWD="\w"
  45. PUID="\$"
  46. GIT="\$(__git_ps1)"
  47. if [ -n "$force_color_prompt" ]; then
  48. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  49. color_prompt=yes
  50. else
  51. color_prompt=
  52. fi
  53. fi
  54. if [ "$color_prompt" = yes ]; then
  55. PS1="${BLUE}(${GREEN}${CWD}${BLUE}) ${NORMAL}${USER}@${HOST}${BRED}${GIT}${GREEN} ${PUID}${NORMAL} "
  56. else
  57. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  58. fi
  59. unset color_prompt force_color_prompt
  60. # If this is an xterm set the title to user@host:dir
  61. case "$TERM" in xterm*|rxvt*)
  62. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  63. ;; *)
  64. ;; esac
  65. # enable color support of ls and also add handy aliases
  66. if [ -x /usr/bin/dircolors ]; then
  67. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  68. alias ls='ls -X --color=auto'
  69. alias grep='grep --color=auto'
  70. alias fgrep='fgrep --color=auto'
  71. alias egrep='egrep --color=auto'
  72. fi
  73. # some more ls aliases
  74. alias ll='ls -alF'
  75. alias la='ls -A'
  76. alias l='ls -CF'
  77. #mah aliases, son
  78. alias atr0phy='ssh br4n@binary.atr0phy.net'
  79. alias cls='clear && ls -X --color=auto'
  80. # Add an "alert" alias for long running commands. Use like so:
  81. # sleep 10; alert
  82. alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
  83. if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
  84. . /etc/bash_completion
  85. fi