Advertisement
corrosiontears

Bashrc 'Usuário' ArchLinux

Dec 7th, 2015
561
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.48 KB | None | 0 0
  1. ## Bashrc Personalizado Manjaro
  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 screenfetch="screenfetch -E"
  28. alias screenfetch-scrot="screenfetch -E -s"
  29. alias cls="clean"
  30. alias ls='ls --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
  31. alias ll='ls -l --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
  32. alias la='ls -la --group-directories-first --time-style=+"%d.%m.%Y %H:%M" --color=auto -F'
  33. alias grep='grep --color=tty -d skip'
  34. alias cp="cp -i"                          # confirm before overwriting something
  35. alias df='df -h'                          # human-readable sizes
  36. alias free='free -m'                      # show sizes in MB
  37. alias np='nano PKGBUILD'
  38.  
  39. # Optimized yaourt:
  40. alias yaconf='yaourt -C'        # Fix all configuration files with vimdiff
  41. alias yaupg='yaourt -Syua'        # Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system.
  42. alias yasu='yaourt --sucre'      # Same as yaupg, but without confirmation
  43. alias yain='yaourt -S'           # Install specific package(s) from the repositories
  44. alias yains='yaourt -U'          # Install specific package not from the repositories but from a file
  45. alias yare='yaourt -R'           # Remove the specified package(s), retaining its configuration(s) and required dependencies
  46. alias yarem='yaourt -Rns'        # Remove the specified package(s), its configuration(s) and unneeded dependencies
  47. alias yarep='yaourt -Si'         # Display information about a given package in the repositories
  48. alias yareps='yaourt -Ss'        # Search for package(s) in the repositories
  49. alias yaloc='yaourt -Qi'         # Display information about a given package in the local database
  50. alias yalocs='yaourt -Qs'        # Search for package(s) in the local database
  51. alias yalst='yaourt -Qe'         # List installed packages, even those installed from AUR (they're tagged as "local")
  52. alias yaorph='yaourt -Qtd'       # Remove orphans using yaourt
  53. alias yaupd='yaourt -Sy && sudo abs'   # Update and refresh the local package and ABS databases against repositories
  54. alias yainsd='yaourt -S --asdeps'        # Install given package(s) as dependencies of another package
  55. alias yamir='yaourt -Syy'                # Force refresh of all package lists after updating
  56.  
  57.  
  58. # ex - archive extractor
  59. # usage: ex <file>
  60. ex ()
  61. {
  62.   if [ -f $1 ] ; then
  63.     case $1 in
  64.       *.tar.bz2)   tar xjf $1   ;;
  65.       *.tar.gz)    tar xzf $1   ;;
  66.       *.bz2)       bunzip2 $1   ;;
  67.       *.rar)       unrar x $1     ;;
  68.       *.gz)        gunzip $1    ;;
  69.       *.tar)       tar xf $1    ;;
  70.       *.tbz2)      tar xjf $1   ;;
  71.       *.tgz)       tar xzf $1   ;;
  72.       *.zip)       unzip $1     ;;
  73.       *.Z)         uncompress $1;;
  74.       *.7z)        7z x $1      ;;
  75.       *)           echo "'$1' cannot be extracted via ex()" ;;
  76.     esac
  77.   else
  78.     echo "'$1' is not a valid file"
  79.   fi
  80. }
  81.  
  82. # prompt
  83. #PS1='[\u@\h \W]\$ ' # Default
  84. 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