Skip to content

Refactor to use Parsy instead of regex#41

Draft
BlakeASmith wants to merge 2 commits intomainfrom
cursor/CLI-33-refactor-to-use-parsy-instead-of-regex-df10
Draft

Refactor to use Parsy instead of regex#41
BlakeASmith wants to merge 2 commits intomainfrom
cursor/CLI-33-refactor-to-use-parsy-instead-of-regex-df10

Conversation

@BlakeASmith
Copy link
Contributor

Refactor parsing infrastructure to use unified Parsy parsers and common models, replacing fragmented regex for improved consistency and maintainability.


Linear Issue: CLI-33

Open in Cursor Open in Web

Co-authored-by: blakeinvictoria <blakeinvictoria@gmail.com>
@cursor
Copy link

cursor bot commented Aug 27, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bugbot free trial expires on September 9, 2025
Learn more in the Cursor dashboard.

if "bash" in shebang:
context.shell_cmd = ["/bin/bash"]
elif re.search(r"\b(sh|dash)\b", shebang):
elif any(shell in shebang for shell in ["sh", "dash"]):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Shell Detection Fails with Substring Matching

The shell interpreter detection for 'sh' and 'dash' now uses substring matching instead of word boundaries. This can lead to incorrect classification, for example, #!/bin/zsh would be detected as /bin/sh.

Fix in Cursor Fix in Web

Co-authored-by: blakeinvictoria <blakeinvictoria@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants