Compare commits

...

3 commits

Author SHA1 Message Date
2b5f43668c
[zsh] Add gpg-crypt commands 2021-05-10 17:05:55 +02:00
1aa9feea8d
[zsh] Added gitio plugin. 2021-05-10 16:55:18 +02:00
ca642f0d14
[zsh] Added Apache2 plugin 2021-05-10 12:52:04 +02:00
2 changed files with 31 additions and 0 deletions

View file

@ -102,3 +102,25 @@ sudoedit() {
}
alias sudoe="sudoedit"
alias sue="sudoedit"
# gpg-crypt {{{
# Encrypt the given file or directory to a given recipient
function gpg-encrypt() {
if [ "$#" -ne 2 ]; then
echo "Usage: $0 FILE/DIRECTORY RECIPIENT" >&2
return 1
fi
tar -c `basename $1` | gpg --encrypt --recipient $2 -o `basename $1`.tar.gpg
}
# Decrypt the given tar.gpg file
function gpg-decrypt() {
if [ "$#" -ne 1 ] || [[ "$1" != *.tar.gpg ]]; then
echo "Usage: $0 FILE.tar.gpg" >&2
return 1
fi
gpg --quiet --decrypt $1 | tar -x
}
# }}}

View file

@ -105,6 +105,15 @@ _plugin completions 'zsh-users/zsh-completions' "$_checkout_latest_version"
# }}}
# Apache2 {{{
# Crappy solution, but only run if it's on a Raspberry Pi 4 B
if grep -q BCM2711 /proc/cpuinfo; then
_plugin apache2 'voronkovich/apache2.plugin.zsh'
fi
# }}}
_plugin gitio 'denysdovhan/gitio-zsh'
# _plugin fzf 'junegunn/fzf' "$_checkout_latest_version" \
# build='./install --bin' \
# after_load='plugin-cfg-path path prepend bin' \