Last active
November 29, 2020 07:36
-
-
Save spryffee/25f1522ded82d1ef9e64d08a75b93848 to your computer and use it in GitHub Desktop.
bashrc addon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# terminal color | |
PS1='\[\033[37m\]\u\[\033[36m\]@\[\033[36m\]\h:\[\033[1;36m\]\w\[\033[31m\]\$\[\033[0m\] ' | |
# aleases | |
alias up="sudo apt -y update" | |
alias updates="apt --just-print upgrade 2>&1 | perl -ne 'if (/Inst\s([\w,\-,\d,\.,~,:,\+]+)\s\[([\w,\-,\d,\.,~,:,\+]+)\]\s\(([\w,\-,\d,\.,~,:,\+]+)\)? /i) {print \"PROGRAM: \$1 INSTALLED: \$2 AVAILABLE: \$3\n\"}' | column -s \" \" -t" | |
alias upgrade-specify='sudo apt -y --only-upgrade install' | |
alias upgrade="sudo apt -y upgrade" | |
alias sshconfig="${EDITOR:-nano} ~/.ssh/config" | |
alias bashrc="${EDITOR:-nano} +120 ~/.bashrc && source ~/.bashrc && echo Bash config edited and reloaded." | |
alias free="free -m" | |
alias h="history" | |
alias diff="colordiff" | |
alias duf='du -sk * | sort -n | perl -ne '\''($s,$f)=split(m{\t});for (qw(K M G)) {if($s<1024) {printf("%.1f",$s);print "$_\t$f"; last};$s=$s/1024}'\' | |
alias repos='apt-cache policy |grep http |awk "{print $2 $3}" |sort -u' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment