summaryrefslogtreecommitdiff
path: root/wr/rdsec
blob: 21ba438b78dedbaaeaebd9b937cb05b276191647 (plain) (blame)
1
2
3
4
5
6
7
8
#!/bin/sh
# rdsec: Read a secure entry, will NOT write it back after.

[ ! -f "$HOME/docs/wr/sec/$1" ] && echo "File $1 does not exist" && return
mkdir -p "/tmp/mksec"
gpg -d --output "/tmp/mksec/$1.decrypted" "$HOME/docs/wr/sec/$1"
nvim "/tmp/mksec/$1.decrypted"
rm "/tmp/mksec/$1.decrypted"