Updated aliases

This commit is contained in:
Tobias Schmidl 2016-10-26 20:58:33 +02:00
parent 8d760eedc3
commit 393e204c0a

View file

@ -1,9 +1,22 @@
alias -g P="2>&1 | pygmentize -g -O full,style=solarized_dark256"
alias pygmentize='pygmentize -g -O full,style=solarized_dark256'
alias cdiff="colordiff"
alias clean-gpg="for a in `gpg -k | sed -rn 's/pub +[0-9]+[DR]\/(0x[0-9A-Fa-f]+).*/\1/p'`; do gpg2 --quiet --no-tty --edit-key $a clean save; done;"
alias diff="diff -W $(( $(tput cols) - 2))"
alias bz2c='bzip2 --best'
alias gzc='gzip --best --no-name'
alias xzc='xz --best --extreme'
current_dist=`lsb_release -c -s`
all_dkms_packages="`apt-cache rdepends --installed dkms | sed -rn 's/^ +([^ ]+)$/\1/p' | sort -iu`"
if [ $use_sudo -eq 1 ];
then
alias adbu='sudo $apt_pref -t ${current_dist}-backports $apt_upgr'
alias aar='sudo apt-get --purge autoremove' #this command is only with apt-get
alias drd='[ -n "$all_dkms_packages" ] && sudo dpkg-reconfigure $all_dkms_packages'
else
alias adbu='su -lc "$apt_pref -t ${current_dist}-backports $apt_upgr" root'
alias aar='su -lc "apt-get --purge autoremove" root' #this command is only with apt-get
alias drd='[ -n "$all_dkms_packages" ] && su -lc "dpkg-reconfigure $all_dkms_packages" root'
fi