Bug Description
create-new-feature keeps a short (<3 char) word in the generated branch name only when that word appears in uppercase in the description, so acronyms like AI or ML survive while ordinary short words are dropped. the code comment says as much.
the bash script does this with a case-sensitive grep:
elif echo "$description" | grep -q "�${word^^}�"; then
the powershell script uses -match, which is case-insensitive by default:
} elseif ($Description -match "�$($word.ToUpper())�") {
because the word being tested was lowercased earlier, -match against its uppercased form always matches, so on powershell every short non-stop word is kept, not just acronyms.
Steps to Reproduce
- on powershell, run
create-new-feature.ps1 -DryRun "go AI now"
- compare with bash
create-new-feature.sh --dry-run "go AI now"
Expected Behavior
both shells produce the same branch name. go (lowercase 2-char word) is dropped, AI (uppercase acronym) is kept -> 001-ai-now.
Actual Behavior
powershell keeps the lowercase go too -> 001-go-ai-now, while bash gives 001-ai-now. same input, different branch name depending on the shell.
| description |
bash |
powershell |
go AI now |
001-ai-now |
001-go-ai-now |
go to the pub |
001-pub |
001-go-pub |
Specify CLI Version
main (current)
AI Agent
n/a (script-level)
Operating System
cross-platform (powershell)
Additional Context
suggested fix: use -cmatch (case-sensitive) instead of -match in scripts/powershell/create-new-feature.ps1, matching the bash grep. small diff.
note: i used an ai assistant to help investigate and write this up.
Bug Description
create-new-featurekeeps a short (<3 char) word in the generated branch name only when that word appears in uppercase in the description, so acronyms likeAIorMLsurvive while ordinary short words are dropped. the code comment says as much.the bash script does this with a case-sensitive
grep:the powershell script uses
-match, which is case-insensitive by default:because the word being tested was lowercased earlier,
-matchagainst its uppercased form always matches, so on powershell every short non-stop word is kept, not just acronyms.Steps to Reproduce
create-new-feature.ps1 -DryRun "go AI now"create-new-feature.sh --dry-run "go AI now"Expected Behavior
both shells produce the same branch name.
go(lowercase 2-char word) is dropped,AI(uppercase acronym) is kept ->001-ai-now.Actual Behavior
powershell keeps the lowercase
gotoo ->001-go-ai-now, while bash gives001-ai-now. same input, different branch name depending on the shell.go AI now001-ai-now001-go-ai-nowgo to the pub001-pub001-go-pubSpecify CLI Version
main (current)
AI Agent
n/a (script-level)
Operating System
cross-platform (powershell)
Additional Context
suggested fix: use
-cmatch(case-sensitive) instead of-matchinscripts/powershell/create-new-feature.ps1, matching the bashgrep. small diff.note: i used an ai assistant to help investigate and write this up.