From 93e1e16ab43f4e4a4d049edd0fa450588d9bf84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=84min=20Baumeler?= Date: Mon, 1 Dec 2025 11:47:39 +0100 Subject: [PATCH] fix: git-after-sync --- src/main.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.sh b/src/main.sh index 0f419c2..3f97938 100755 --- a/src/main.sh +++ b/src/main.sh @@ -182,7 +182,7 @@ while true; do --bind="alt-l:reload:$0 --reload-day {1} '+1 month'" \ --bind="alt-h:reload:$0 --reload-day {1} '-1 month'" \ --bind="ctrl-r:reload:$0 --reload-day today" \ - --bind="ctrl-s:execute($SYNC_CMD ; printf 'Press to continue.'; read -r tmp)" \ + --bind="ctrl-s:execute($SYNC_CMD; [ -n \"${GIT:-}\" ] && ${GIT:-echo} add -A && ${GIT:-echo} commit -am 'Synchronized'; printf 'Press to continue.'; read -r tmp)" \ --bind='tab:down' \ --bind='shift-tab:up' \ --bind='focus:hide-preview+transform( @@ -383,7 +383,7 @@ while true; do --bind="alt-l:reload:$0 --reload-week {2} '+1 year'" \ --bind="alt-h:reload:$0 --reload-week {2} '-1 year'" \ --bind="ctrl-r:rebind(load)+reload($0 --reload-week today)+show-preview" \ - --bind="ctrl-s:execute($SYNC_CMD ; printf 'Press to continue.'; read -r tmp)" \ + --bind="ctrl-s:execute($SYNC_CMD; [ -n \"${GIT:-}\" ] && ${GIT:-echo} add -A && ${GIT:-echo} commit -am 'Synchronized'; printf 'Press to continue.'; read -r tmp)" \ --bind="/:show-input+unbind(q)+unbind(j)+unbind(k)+unbind(l)+unbind(h)+unbind(ctrl-l)+unbind(ctrl-h)+unbind(alt-l)+unbind(alt-h)+unbind(load)+hide-preview+reload:$0 --reload-all" \ --bind="backward-eof:hide-input+rebind(q)+rebind(j)+rebind(k)+rebind(l)+rebind(h)+rebind(ctrl-l)+rebind(ctrl-h)+rebind(alt-l)+rebind(alt-h)+rebind(load)+show-preview+reload:$0 --reload-week today" \ --bind="esc:clear-query+hide-input+rebind(q)+rebind(j)+rebind(k)+rebind(l)+rebind(h)+rebind(ctrl-l)+rebind(ctrl-h)+rebind(alt-l)+rebind(alt-h)+rebind(load)+show-preview+reload:$0 --reload-week today"