vns_print now verifies the existence of the note to print
This commit is contained in:
16
vns
16
vns
@@ -308,11 +308,17 @@ vns_print () {
|
||||
# print the given note to stdout
|
||||
|
||||
# Verify $1 is bound
|
||||
if [ "$#" -lt 1 ]; then vns_raise "Insufficient arguments" 11; fi
|
||||
|
||||
# Decrypt the specified note
|
||||
gpg2 --batch -d "$VNS_STORE/$1.gpg"
|
||||
|
||||
if [ "$#" -lt 1 ]; then
|
||||
vns_raise "Insufficient arguments" 11
|
||||
|
||||
# Verify $1 exists
|
||||
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 () {
|
||||
|
||||
Reference in New Issue
Block a user