X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t;h=520e7c34f9b7225c058143cf96b8cb27d9f43196;hb=f3541c5660fe36340eeb0492ed9485cbdbf46e2f;hp=beac1570f5ccc41da9280c98ee25bfa19d93daa2;hpb=ce3c088bafa01a1362cf6ec913389ac7b09fdd88;p=t.git diff --git a/t b/t index beac157..520e7c3 100755 --- a/t +++ b/t @@ -1,6 +1,6 @@ #!/bin/sh -e # t -- simple notes manager -# Copyright (C) 2013-2017 Sergey Matveev +# Copyright (C) 2013-2020 Sergey Matveev # Invoke the script without any arguments to briefly print all notes. # Otherwise you can specify the following ones: # a -- add new note (either starts an editor if not arguments are specified, @@ -44,7 +44,8 @@ m) $EDITOR $(get_note $2) ;; *) - cat $(get_note $1) + note=$(get_note $1) + [ -e "$note" ] && cat $note || exit 1 ;; esac purge