mirror of
https://github.com/charmbracelet/gum
synced 2026-03-14 13:45:45 +01:00
docs: fix commit.sh example to not use bashism
This commit is contained in:
parent
7e3cf1f62f
commit
e4fc0c2e74
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# This script is used to write a conventional commit message.
|
||||
# It prompts the user to choose the type of commit as specified in the
|
||||
|
|
@ -14,7 +14,7 @@ TYPE=$(gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert"
|
|||
SCOPE=$(gum input --placeholder "scope")
|
||||
|
||||
# Since the scope is optional, wrap it in parentheses if it has a value.
|
||||
[[ -n "$SCOPE" ]] && SCOPE="($SCOPE)"
|
||||
test -n "$SCOPE" && SCOPE="($SCOPE)"
|
||||
|
||||
# Pre-populate the input with the type(scope): so that the user may change it
|
||||
SUMMARY=$(gum input --value "$TYPE$SCOPE: " --placeholder "Summary of this change")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue