zsh/aliases.zsh
Tobias Schmidl dfe3abc014 inital
2018-01-29 16:10:37 +01:00

22 lines
909 B
Bash

alias cdiff="colordiff"
alias clean-gpg="for a in `gpg2 -k | sed -rn 's/pub +[a-z0-9]+\/(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'
alias extip='curl -LR1fs --compressed https://ipinfo.io/ | jq -Sc'
alias jjar='java -jar'
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 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 drd='[ -n "$all_dkms_packages" ] && su -lc "dpkg-reconfigure $all_dkms_packages" root'
fi