From 83228d56450e8d2ae26fa8d1e3e399914fcc4f19 Mon Sep 17 00:00:00 2001 From: Alen Date: Wed, 13 Sep 2023 01:58:06 +0400 Subject: Add basic support for Windows --- .chezmoi.toml.tmpl | 5 +++-- .chezmoiignore | 3 +++ 2 files changed, 6 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 }} diff --git a/.chezmoiignore b/.chezmoiignore index db7e307..182b6ad 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -17,3 +17,6 @@ # Ignore run_gnome_* for non-GNOME {{ if not (lookPath "dconf") -}} /*gnome_*.sh {{- end }} + +# Ignore all shell scripts on Windows +{{ if eq .chezmoi.os "windows" -}} /*.sh {{- end }} -- cgit 1.4.1-2-gfad0