Fix zsh script

This commit is contained in:
2025-04-02 15:55:34 -03:00
parent abb3c811f9
commit fd8ef13162
2 changed files with 13 additions and 8 deletions

View File

@ -46,10 +46,10 @@ function .add {
chezmoi add "$1"
chezmoi git add .
chezmoi git status
read -p "Commit changes? [y/N] " -r answer
read -r "Commit changes? [y/N] " answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git commit -- -am "$2"
read -p "Push changes? [y/N] " -r answer
read -r "Push changes? [y/N] " answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git push
fi
@ -64,10 +64,10 @@ function .re-add {
chezmoi re-add
chezmoi git status
chezmoi git diff
read -p "Commit changes? [y/N] " -r answer
if [[ $answer =~ ^[Yy]$ ]]; theno
read -r "?Commit changes? [y/N] " answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git commit -- -am "$1"
read -p "Push changes? [y/N] " -r answer
read -r "?Push changes? [y/N] " answer
if [[ $answer =~ ^[Yy]$ ]]; then
chezmoi git push
fi