From 28616f8893d2ce4b91b798c7ed9d59ac8c59cceb Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Mon, 7 Jul 2025 06:14:18 +0200 Subject: [PATCH 1/3] .commit_message.tmpl --- .chezmoi.toml.tmpl | 8 ++++++++ .commit_message.tmpl | 1 + dot_gitconfig => dot_gitconfig.tmpl | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .chezmoi.toml.tmpl create mode 100644 .commit_message.tmpl rename dot_gitconfig => dot_gitconfig.tmpl (96%) diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl new file mode 100644 index 0000000..f33db1f --- /dev/null +++ b/.chezmoi.toml.tmpl @@ -0,0 +1,8 @@ +{{- $github_email := promptStringOnce . "github_email" "Github Email address" -}} + +[data] + github_email = {{ $github_email | quote }} +[git] + autoPush = true + autoCommit = true + commitMessageTemplate = ".commit_message.tmpl" diff --git a/.commit_message.tmpl b/.commit_message.tmpl new file mode 100644 index 0000000..d346f50 --- /dev/null +++ b/.commit_message.tmpl @@ -0,0 +1 @@ +{{ promptString \"Commit message\" }} diff --git a/dot_gitconfig b/dot_gitconfig.tmpl similarity index 96% rename from dot_gitconfig rename to dot_gitconfig.tmpl index 1f8327f..fe06d15 100644 --- a/dot_gitconfig +++ b/dot_gitconfig.tmpl @@ -2,7 +2,7 @@ [user] # Please adapt and uncomment the following lines: name = Daniel Bauer - email = github@dbauer.me + email = {{ .github_email | quote }} [core] pager = sh -c 'command -v diff-so-fancy >/dev/null && exec diff-so-fancy || less --tabs=4 -RX' pager = less From 392600059c148c50495e782e2a195c6a8c1ce56c Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Mon, 7 Jul 2025 06:15:41 +0200 Subject: [PATCH 2/3] .commit_message.tmpl --- dot_zshrc | 1 + 1 file changed, 1 insertion(+) diff --git a/dot_zshrc b/dot_zshrc index 06aec8a..a880dac 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -36,6 +36,7 @@ antidote load # vim mode bindkey -v +# fzf [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh bindkey '^f' fzf-file-widget From 6d07bb8976f84265805a3e88928f63f6674d2c13 Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Mon, 7 Jul 2025 06:18:05 +0200 Subject: [PATCH 3/3] test --- .commit_message.tmpl | 2 +- dot_zshrc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.commit_message.tmpl b/.commit_message.tmpl index d346f50..cac79c5 100644 --- a/.commit_message.tmpl +++ b/.commit_message.tmpl @@ -1 +1 @@ -{{ promptString \"Commit message\" }} +{{ promptString "Commit message" }} diff --git a/dot_zshrc b/dot_zshrc index a880dac..06aec8a 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -36,7 +36,6 @@ antidote load # vim mode bindkey -v -# fzf [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh bindkey '^f' fzf-file-widget