Skip to content

_BOUND_IN_CONDITION Reads an Ordinary Command Flag as an Arithmetic Guard #1636

Closed

Description

@ptr727

The -(?:lt|le|gt|ge)\b alternative is matched against the whole condition text rather than against a test-builtin invocation, so any command flag spelling one of those pairs reads as a bound.

Allowed today:

while ! ls -lt out | grep -q result; do sleep 30; done
while ! grep -le done log; do sleep 30; done

ls -lt is an everyday flag pair, which makes this reachable without anyone trying.

The pattern needs to require the operator to sit inside a test or [ invocation, or inside [[ ]], rather than anywhere in the condition. Present since requirement 7 shipped in #1622. Found by a local strict review pass on #1632.

Activity

  1. added
    bug
    agents
    pre-existing
    on Sep 15, 2026
  2. added a commit that references this issue on Sep 28, 2026
    c0b6cb1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentsbugpre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions