vns_print now verifies the existence of the note to print
This commit is contained in:
12
vns
12
vns
@@ -308,11 +308,17 @@ vns_print () {
|
|||||||
# print the given note to stdout
|
# print the given note to stdout
|
||||||
|
|
||||||
# Verify $1 is bound
|
# Verify $1 is bound
|
||||||
if [ "$#" -lt 1 ]; then vns_raise "Insufficient arguments" 11; fi
|
if [ "$#" -lt 1 ]; then
|
||||||
|
vns_raise "Insufficient arguments" 11
|
||||||
|
|
||||||
# Decrypt the specified note
|
# Verify $1 exists
|
||||||
gpg2 --batch -d "$VNS_STORE/$1.gpg"
|
elif ! [ -r "$VNS_STORE/$1.gpg" ]; then
|
||||||
|
vns_raise "Could not read $1" 12
|
||||||
|
|
||||||
|
else
|
||||||
|
# Decrypt the specified note
|
||||||
|
gpg2 --batch -d "$VNS_STORE/$1.gpg"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
vns_mv () {
|
vns_mv () {
|
||||||
|
|||||||
Reference in New Issue
Block a user