Advertisement
Guest User

Untitled

a guest
May 11th, 2011
1,195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.56 KB | None | 0 0
  1. # ~/.bashrc: executed by bash(1) for non-login shells.
  2. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  3. # for examples
  4. # If not running interactively, don't do anything
  5. [ -z "$PS1" ] && return
  6.  
  7. # don't put duplicate lines in the history. See bash(1) for more options
  8. # don't overwrite GNU Midnight Commander's setting of `ignorespace'.
  9. export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
  10. # ... or force ignoredups and ignorespace
  11. export HISTCONTROL=ignoreboth
  12.  
  13. # append to the history file, don't overwrite it
  14. shopt -s histappend
  15.  
  16. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  17.  
  18. # check the window size after each command and, if necessary,
  19. # update the values of LINES and COLUMNS.
  20. shopt -s checkwinsize
  21.  
  22. # make less more friendly for non-text input files, see lesspipe(1)
  23. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  24.  
  25. # set variable identifying the chroot you work in (used in the prompt below)
  26. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  27.     debian_chroot=$(cat /etc/debian_chroot)
  28. fi
  29.  
  30. # set a fancy prompt (non-color, unless we know we "want" color)
  31. case "$TERM" in
  32.     xterm-color) color_prompt=yes;;
  33. esac
  34.  
  35.  
  36. # enable color support of ls and also add handy aliases
  37. if [ -x /usr/bin/dircolors ]; then
  38.     alias ls='ls --color=auto'
  39. fi
  40.  
  41. # enable programmable completion features (you don't need to enable
  42. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  43. # sources /etc/bash.bashrc).
  44. if [ -f /etc/bash_completion ]; then
  45.     . /etc/bash_completion
  46. fi
  47.  
  48. # Colors:
  49. black='\e[0;30m'
  50. blue='\e[0;34m'
  51. green='\e[0;32m'
  52. cyan='\e[0;36m'
  53. red='\e[0;31m'
  54. purple='\e[0;35m'
  55. brown='\e[0;33m'
  56. lightgray='\e[0;37m'
  57. darkgray='\e[1;30m'
  58. lightblue='\e[1;34m'
  59. lightgreen='\e[1;32m'
  60. lightcyan='\e[1;36m'
  61. lightred='\e[1;31m'
  62. lightpurple='\e[1;35m'
  63. yellow='\e[1;33m'
  64. white='\e[1;37m'
  65. nc='\e[0m'
  66.  
  67. # Functions and Scripts:
  68. upinfo ()
  69. {
  70. echo -ne "\t ";uptime | awk /'up/ {print $3,$4,$5,$6,$7,$8,$9,$10}'
  71. }
  72.  
  73.  
  74. #------------------------------------------////
  75. # Prompt:
  76. #------------------------------------------////
  77. PS1='\[\033[01;32m\]\u\[\033[01;34m\]@\[\033[01;31m\]\h\[\033[00;34m\](\[\033[01;34m\]\w\[\033[00;34m\])\[\033[01;32m\]:\[\033[00m\]'
  78.  
  79. # System Information:
  80. clear
  81. echo -ne "${red}Today is:\t\t${cyan}" `date`; echo ""
  82. echo -e "${red}Kernel Information: \t${cyan}" `uname -smr`
  83. echo -ne "${red}Uptime is: \t${cyan}";upinfo;echo ""
  84.  
  85. alias rm='rm -i'
  86. alias cp='cp -i'
  87. alias mv='mv -i'
  88. alias ll='ls -l'
  89. alias reload='source ~/.bashrc'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement