dotfiles/aliases.zsh

31 lines
1 KiB
Bash
Raw Normal View History

2016-02-23 15:50:02 +01:00
alias cdiff="colordiff"
2018-01-20 14:42:30 +01:00
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;"
2016-10-26 20:58:33 +02:00
alias diff="diff -W $(( $(tput cols) - 2))"
2016-02-23 15:50:02 +01:00
alias bz2c='bzip2 --best'
alias gzc='gzip --best --no-name'
alias xzc='xz --best --extreme'
2017-05-26 07:42:23 +02:00
alias halt='systemctl poweroff'
alias reboot='systemctl reboot'
2017-11-16 15:12:31 +01:00
#alias pyvenv='python3 -m venv'
2017-09-27 16:16:35 +02:00
alias extip='curl -LR1fs --compressed https://ipinfo.io/ | jq -Sc'
2018-01-20 14:42:30 +01:00
alias todo='todo-txt'
2017-09-27 16:16:35 +02:00
alias jjar='java -jar'
2017-11-16 15:12:31 +01:00
alias td='todo.sh'
alias todo='todo.sh'
2016-10-26 20:58:33 +02:00
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