Use incremental IDs, not datestamps
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
parent
4e70ae51df
commit
0ddcf20a59
1 changed files with 4 additions and 2 deletions
6
zet
6
zet
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue