Update chezmoi zsh file to prompt before showing a diff

This commit is contained in:
Tony Blyler 2022-05-11 19:29:17 -04:00
parent 22dca4298f
commit d86723e5be
Signed by: tblyler
GPG key ID: 7F13D9A60C0D678E

View file

@ -36,12 +36,27 @@
exit 0
fi
while true; do
read -r 'CONTINUE?Chezmoi has updates, review now? [y/N] '
case "$CONTINUE" in
'y'|'Y'|'YES'|'yes'|'Yes')
break
;;
'n'|'N'|'NO'|'no'|'No'|'')
echo 'not applying changes'
exit 0
;;
esac
done
chezmoi diff
while true; do
read -r 'APPLY?apply? [y/N] '
case "${APPLY:-}" in
case "$APPLY" in
'y'|'Y'|'YES'|'yes'|'Yes')
echo 'applying changes'
chezmoi apply