Update chezmoi zsh file to prompt before showing a diff
This commit is contained in:
parent
22dca4298f
commit
d86723e5be
1 changed files with 16 additions and 1 deletions
|
@ -36,12 +36,27 @@
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
chezmoi diff
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -r 'APPLY?apply? [y/N] '
|
read -r 'APPLY?apply? [y/N] '
|
||||||
|
|
||||||
case "${APPLY:-}" in
|
case "$APPLY" in
|
||||||
'y'|'Y'|'YES'|'yes'|'Yes')
|
'y'|'Y'|'YES'|'yes'|'Yes')
|
||||||
echo 'applying changes'
|
echo 'applying changes'
|
||||||
chezmoi apply
|
chezmoi apply
|
||||||
|
|
Loading…
Reference in a new issue