Skip to content

Conversation

jr
Copy link
Collaborator

@jr jr commented Sep 30, 2025

I may have let gpt-5 get too far off the leash with this one.

…pression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 30, 2025
Copy link

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

I found some issues that need attention. See inline comments for P1–P2 with concrete next steps.

return `__QUOTE_${quotes.length - 1}__`
})

// Handle fish-style command substitutions and POSIX subshell grouping: ( ... )
Copy link

Choose a reason for hiding this comment

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

[P1] In the bare '(' handler for grouping/fish substitutions, arithmetic evaluation '(( ... ))' (without a preceding '$') can be misclassified as a subshell, surfacing faux sub-commands (e.g., 'count++'). Add a guard to keep ((...)) intact rather than extracting it as a subshell.

// Examples: *(+whoami), *(.+{'whoami'}), *(+"whoami")
// Treat + followed by a non-digit token inside a qualifier list as executable (exclude numeric-only like (+1))
// Anchor to a preceding glob meta to reduce false positives.
const zshGlobQualifierPlusShorthand =
Copy link

Choose a reason for hiding this comment

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

[P2] The zsh glob +shorthand detector may overmatch numeric-only tokens when wrapped (e.g., '(+{1})', '(+"1")'). Consider refining to ignore pure-digit tokens in those branches and add negative tests to pin behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

2 participants