summary refs log tree commit diff
path: root/.chezmoi.toml.tmpl
diff options
context:
space:
mode:
authorAlen <alen@dotfiles.xyz>2023-09-13 01:58:06 +0400
committerAlen <alen@dotfiles.xyz>2023-09-13 01:58:06 +0400
commit83228d56450e8d2ae26fa8d1e3e399914fcc4f19 (patch)
treed01308a84032f7018def2eccee7cb89827a70cf9 /.chezmoi.toml.tmpl
parent80378bf42600463a349b47243062020c7c4aeb00 (diff)
Add basic support for Windows
Diffstat (limited to '.chezmoi.toml.tmpl')
-rw-r--r--.chezmoi.toml.tmpl5
1 files changed, 3 insertions, 2 deletions
diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl
index b32744b..7c1864f 100644
--- a/.chezmoi.toml.tmpl
+++ b/.chezmoi.toml.tmpl
@@ -2,8 +2,9 @@
 {{- if lookPath "delta" -}}
     {{- $defaultPager = "delta" -}}
 {{- end -}}
-{{- $defaultName := .chezmoi.username | title -}}
-{{- $defaultEmail := printf "%s@%s" .chezmoi.username .chezmoi.hostname -}}
+{{- $defaultUsername := .chezmoi.username | replaceAllRegex "^[^\\\\]+\\\\" "" }}
+{{- $defaultName := $defaultUsername | title -}}
+{{- $defaultEmail := printf "%s@%s" $defaultUsername .chezmoi.hostname -}}
 
 [diff]
     pager = {{ promptString "chezmoi pager" $defaultPager | quote }}