diff --git a/README.md b/README.md index b732679..dab0afc 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ gum write --placeholder "Details of this change" ``` Prompt for a confirmation before committing: +> `gum confirm` exits with status `0` if confirmed and status `1` if cancelled. ```bash gum confirm "Commit changes?" && git commit -m "$SUMMARY" -m "$DESCRIPTION" @@ -84,7 +85,7 @@ DESCRIPTION=$(gum write --placeholder "Details of this change") gum confirm "Commit changes?" && git commit -m "$SUMMARY" -m "$DESCRIPTION" ``` -Running the ./examples/commit.sh script to commit to git +Running the ./examples/commit.sh script to commit to git ## Installation diff --git a/examples/commit.sh b/examples/commit.sh index 95c34ef..f97a4b6 100755 --- a/examples/commit.sh +++ b/examples/commit.sh @@ -21,4 +21,4 @@ SUMMARY=$(gum input --value "$TYPE$SCOPE: " --placeholder "Summary of this chang DESCRIPTION=$(gum write --placeholder "Details of this change") # Commit these changes if user confirms -gum confirm && git commit -m "$SUMMARY" -m "$DESCRIPTION" +gum confirm "Commit changes?" && git commit -m "$SUMMARY" -m "$DESCRIPTION"