#!/bin/sh -e
# t -- simple notes manager
-# Copyright (C) 2013-2016 Sergey Matveev <stargrave@stargrave.org>
+# Copyright (C) 2013-2019 Sergey Matveev <stargrave@stargrave.org>
# 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,
$EDITOR $(get_note $2)
;;
*)
- cat $(get_note $1)
+ note=$(get_note $1)
+ [ -e "$note" ] && cat $note || exit 1
;;
esac
purge