diff options
Diffstat (limited to 'wr/rdsec')
-rwxr-xr-x | wr/rdsec | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/wr/rdsec b/wr/rdsec new file mode 100755 index 0000000..21ba438 --- /dev/null +++ b/wr/rdsec @@ -0,0 +1,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" |