danix
's git repository
home
/
my projects
/
bash-notes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
when creating a note, if the title is not specified, two random words will be assigne...
[bash-notes.git]
/
SOURCE
/
CORE
/
core-add.sh
diff --git
a/SOURCE/CORE/core-add.sh
b/SOURCE/CORE/core-add.sh
index
aa9d451
..
ed6256c
100644
(file)
--- a/
SOURCE/CORE/core-add.sh
+++ b/
SOURCE/CORE/core-add.sh
@@
-4,7
+4,8
@@
function addnote() {
rm $TMPDB
fi
- NOTETITLE="$1"
+ RTITLE=$(random_title)
+ [[ -z "$1" ]] && NOTETITLE="$RTITLE" || NOTETITLE="$1"
echo "adding new note - \"$NOTETITLE\""
# shellcheck disable=SC2086
LASTID=$($JQ '.notes[-1].id // 0 | tonumber' $DB)