From 8af9ee0b63a2e930e872b9dbe673a533bb2dce71 Mon Sep 17 00:00:00 2001 From: Marc Henry de Frahan Date: Fri, 26 Jan 2024 13:21:32 -0700 Subject: [PATCH] better prompts --- .chezmoi.toml.tmpl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl index 7fccded..8f176fd 100644 --- a/.chezmoi.toml.tmpl +++ b/.chezmoi.toml.tmpl @@ -2,8 +2,12 @@ command = "emacs" args = ["-nw"] -{{- $use_zsh_root_dir := promptBoolOnce . "use_zsh_root_dir" "Use ZSH_ROOT_DIR for tmux shell" }} -{{ $email := promptString "email" -}} +{{ $email := "" }} +{{ $use_zsh_root_dir := false }} +{{ if stdinIsATTY }} +{{- $use_zsh_root_dir = promptBool "Use ZSH_ROOT_DIR for tmux shell" }} +{{ $email = promptString "email" -}} +{{ end }} [data] use_zsh_root_dir = {{ $use_zsh_root_dir }}