Advertisement
corrosiontears

.bashrc usuário CrunchBang/Debian

Jun 13th, 2013
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.95 KB | None | 0 0
  1. [ -z "$PS1" ] && return
  2.  
  3. HISTSIZE=10000
  4. HISTFILESIZE=${HISTSIZE}
  5. HISTIGNORE="pwd:ls:ls -la:exit:bash:clear:cd:./configure:make:sudo make install:su:sudo su:editar_sources.list:sudo apt-get update:sudo apt-get update:sudo apt-get dist-upgrade:sudo apt-get autoclean:history:screenfetch:"
  6. HISTCONTROL=ignoredups
  7. HISTCONTROL=ignorespace
  8. HISTCONTROL=erasedups
  9.  
  10. shopt -s histappend
  11. shopt -s checkwinsize
  12.  
  13. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  14.  
  15. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  16.     debian_chroot=$(cat /etc/debian_chroot)
  17. fi
  18.  
  19. case "$TERM" in
  20.     xterm-color) color_prompt=yes;;
  21. esac
  22.  
  23. force_color_prompt=yes
  24.  
  25. if [ -n "$force_color_prompt" ]; then
  26.     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  27.     color_prompt=yes
  28.     else
  29.     color_prompt=
  30.     fi
  31. fi
  32.  
  33. if [ "$color_prompt" = yes ]; then
  34.     PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  35. else
  36.     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  37. fi
  38. unset color_prompt force_color_prompt
  39.  
  40. case "$TERM" in
  41. xterm*|rxvt*)
  42.     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  43.     ;;
  44. *)
  45.     ;;
  46. esac
  47.  
  48. if [ -x /usr/bin/dircolors ]; then
  49.     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  50.  
  51. alias ls='ls --color=auto'
  52. alias dir='dir --color=auto'
  53. alias vdir='vdir --color=auto'
  54. alias grep='grep --color=auto'
  55. alias fgrep='fgrep --color=auto'
  56. alias egrep='egrep --color=auto'
  57. fi
  58.  
  59. alias l='ls -CF'
  60. alias la='ls -ac --color=auto'
  61. alias ll='ls -lah --color=auto'
  62. alias lsd='ls -d */'
  63. alias lsg='ls --color=auto | g'
  64. alias lag='ls -a --color=auto | g'
  65. alias llg='ls -lah --color=auto | g'
  66. alias g="grep --color=always"
  67. alias gi="grep -i --color=always"
  68.  
  69. alias mv='mv -i'
  70. alias cp='cp -i'
  71. alias rm='rm -i'
  72. alias rmf='rm -Rfvi'
  73. alias cpf='\cp -vi'
  74. alias mvf='\mv -vi'
  75. alias rmd='rm -Rfvi'
  76.  
  77. alias psa='ps auxf'
  78. alias cal='echo -e "${CYAN}"; cal""'
  79. alias hist='history | g $1' # termo
  80. alias du='du -sh'
  81. alias dul='\du -h | less'
  82. alias df='df -h'
  83. alias nano='nano -w'
  84. alias nanob='nano -w -B'
  85. alias screenfetch="screenfetch -E"
  86. alias screenfetch-screenshot="screenfetch -E -s"
  87.  
  88. if [ -f ~/.bash_aliases ]; then
  89.     . ~/.bash_aliases
  90. fi
  91.  
  92. if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
  93.     . /etc/bash_completion
  94. fi
  95.  
  96. #
  97.  
  98. echo '   _ '
  99. echo '  °v° ** Bem vindo ao Debian '`cat /etc/debian_version`' **'
  100. echo ' /(_)\ '
  101. echo '  ^ ^ ' `date`
  102. echo ' '
  103. if [ "$(id -un)" == "root" ]; then
  104.  PS1='\n\[\e[0;90m\][\h] [\[\e[0;33m\]\w\[\e[0;90m\]]\n\[\e[0;90m\][\[\e[0;31m\]\u\[\e[0;90m\]] >>\[\e[0m\] '
  105.  PS2='\[\e[0;90m\][\[\e[0;31m\]\u\[\e[0;90m\]] >>\[\e[0m\] '
  106. else
  107.  PS2='\[\e[0;90m\][\[\e[0;32m\]\u\[\e[0;90m\]] >>\[\e[0m\] '
  108.  PS1='\n\[\e[0;90m\][\h] [\[\e[0;33m\]\w\[\e[0;90m\]]$(__git_ps1 " [\[\e[0;34m\]%s\[\e[0;90m\]]")\n\[\e[0;90m\][\[\e[0;32m\]\u\[\e[0;90m\]] >>\[\e[0m\] '
  109. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement