Skip to content

Commit 3fd5144

Browse files
committed
fix: use portable grep -qw for word boundary in create-new-feature.sh
BSD grep (macOS) doesn't support \b as a word boundary. Replace with grep -qw which is POSIX-portable.
1 parent 2f352cd commit 3fd5144

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/git/scripts/bash/create-new-feature.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ generate_branch_name() {
272272
if ! echo "$word" | grep -qiE "$stop_words"; then
273273
if [ ${#word} -ge 3 ]; then
274274
meaningful_words+=("$word")
275-
elif echo "$description" | grep -q "\b${word^^}\b"; then
275+
elif echo "$description" | grep -qw -- "${word^^}"; then
276276
meaningful_words+=("$word")
277277
fi
278278
fi

0 commit comments

Comments
 (0)