diff --git a/vns b/vns index 3b6c30e..158b51b 100644 --- a/vns +++ b/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 () {