Advertisement
corrosiontears

Bashrc personalizado para Void Linux

Jun 2nd, 2017
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.85 KB | None | 0 0
  1. ## Bashrc Personalizado Manjaro, otimizado para Void Linux!
  2. # Baseado no original com algumas personalizações
  3.  
  4. if [ -f /etc/bash_completion ]; then
  5.         . /etc/bash_completion
  6. fi
  7.  
  8. xhost +local:root > /dev/null 2>&1
  9.  
  10. complete -cf sudo
  11.  
  12. shopt -s cdspell
  13. shopt -s checkwinsize
  14. shopt -s cmdhist
  15. shopt -s dotglob
  16. shopt -s expand_aliases
  17. shopt -s extglob
  18. shopt -s histappend
  19. shopt -s hostcomplete
  20.  
  21. export HISTSIZE=10000
  22. export HISTFILESIZE=${HISTSIZE}
  23. export HISTCONTROL=ignoreboth
  24. export JAVA_FONTS=/usr/share/fonts/TTF
  25. export EDITOR=/usr/bin/nano
  26.  
  27. alias cls="clean"
  28. alias ls='ls --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
  29. alias ll='ls -l --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
  30. alias la='ls -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
  31. alias grep='grep --color=tty -d skip'
  32. alias cp="cp -i"                          # confirm before overwriting something
  33. alias df='df -h'                          # human-readable sizes
  34. alias free='free -m'                      # show sizes in MB
  35. alias np='nano PKGBUILD'
  36.  
  37. # ex - archive extractor
  38. # usage: ex <file>
  39. ex ()
  40. {
  41.   if [ -f $1 ] ; then
  42.     case $1 in
  43.       *.tar.bz2)   tar xjf $1   ;;
  44.       *.tar.gz)    tar xzf $1   ;;
  45.       *.bz2)       bunzip2 $1   ;;
  46.       *.rar)       unrar x $1     ;;
  47.       *.gz)        gunzip $1    ;;
  48.       *.tar)       tar xf $1    ;;
  49.       *.tbz2)      tar xjf $1   ;;
  50.       *.tgz)       tar xzf $1   ;;
  51.       *.zip)       unzip $1     ;;
  52.       *.Z)         uncompress $1;;
  53.       *.7z)        7z x $1      ;;
  54.       *)           echo "'$1' cannot be extracted via ex()" ;;
  55.     esac
  56.   else
  57.     echo "'$1' is not a valid file"
  58.   fi
  59. }
  60.  
  61. # prompt
  62. #PS1='[\u@\h \W]\$ ' # Default
  63. PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement