From 28616f8893d2ce4b91b798c7ed9d59ac8c59cceb Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Mon, 7 Jul 2025 06:14:18 +0200 Subject: [PATCH] .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