diff options
Diffstat (limited to '.zk')
| -rwxr-xr-x | .zk/commit.sh | 12 | ||||
| -rw-r--r-- | .zk/config.toml | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/.zk/commit.sh b/.zk/commit.sh new file mode 100755 index 0000000..55dace9 --- /dev/null +++ b/.zk/commit.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +grep $(date -I) <(git log -1) >/dev/null +if [ $? -eq 0 ]; then + # Committed today already + git add -A + git commit --amend --reset-author --no-edit +else + # New commit today + git add -A + git commit -m "snapshot: $(date -I)" +fi diff --git a/.zk/config.toml b/.zk/config.toml index 3a9b19a..24fc620 100644 --- a/.zk/config.toml +++ b/.zk/config.toml @@ -201,6 +201,9 @@ dead-link = "error" # Edit this configuration file. conf = '$EDITOR "$ZK_NOTEBOOK_DIR/.zk/config.toml"' +# Commmit changes +commit = "$ZK_NOTEBOOK_DIR/.zk/commit.sh" + # Creation commands huge-idea = 'zk new --no-input --template="huge-idea.md"' tiny-idea = 'zk new --no-input --template="tiny-idea.md"' |
