use the clean-gpg alias only if there is a gnupg2 executable present

This commit is contained in:
Tobias Schmidl 2018-01-30 08:47:55 +01:00
parent d9dfea0e3c
commit fc49b2d745

View file

@ -1,5 +1,7 @@
alias cdiff="colordiff" 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;"
[ -x "$(which gpg2)" ] && 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 diff="diff -W $(( $(tput cols) - 2))"
alias bz2c='bzip2 --best' alias bz2c='bzip2 --best'