Some gpg stuff

This commit is contained in:
mokou 2021-01-28 11:56:22 +01:00
parent 6bb9773b63
commit 75bfd598c2
2 changed files with 15 additions and 1 deletions

View file

@ -17,6 +17,7 @@ if test -e ~/.nix-profile/etc/profile.d/nix.sh
end
# PATH adjustment
setpath /opt/homebrew/bin
setpath ~/.rbenv/shims
setpath ~/.rbenv/bin
setpath ~/.cargo/bin
@ -99,3 +100,13 @@ if command --search exa > /dev/null do
alias ls "exa"
end
# Some neat GPG shorthands
function secret
set output ~/$argv[1].(date +%s).enc
gpg --encrypt --armor --output $output $argv[1]; and echo "$argv[1] -> $output"
end
function reveal
set output (echo $argv[1] | rev | cut -c16- | rev)
gpg --decrypt --output $output $argv[1]; and echo "$argv[1] -> $output"
end