Use incremental IDs, not datestamps

Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-09-20 22:15:26 +01:00
parent 4e70ae51df
commit 0ddcf20a59

6
zet
View file

@ -170,7 +170,9 @@ main() {
}
new_zid() {
date '+%Y%m%d%H%M%S'
EXISTING_ZETTELS=$(find . -maxdepth 1 -type d -regex './[0-9]+' | wc -l)
echo $((EXISTING_ZETTELS + 1))
}
on_save() {
@ -202,7 +204,7 @@ search_zettel() {
QUERY="$*"
git grep -i --name-only -E "$QUERY" | grep -o -E '[0-9]{14}' | sort | uniq
git grep -i --name-only -E "$QUERY" | grep -o -E '[0-9]+' | sort -un
}
select_zet() {