Skip to content

fix: align uppercase short flags in help output - #1562

Open
l2ysho wants to merge 3 commits into
masterfrom
claude/fix-help-uppercase-short-flags-5adb63
Open

l2ysho wants to merge 3 commits into
masterfrom
claude/fix-help-uppercase-short-flags-5adb63

Conversation

@l2ysho

@l2ysho l2ysho commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Note

TL;DR — flags with an uppercase short form (-H, -X) were indented four spaces deeper than lowercase ones in --help, so the FLAGS block didn't line up. The indent check was case-sensitive. One-character fix: /^-[a-z]/ → /^-[a-z]/i. Only apify api has uppercase short flags, so only its help and its docs/reference.md block change.

apify api --help, before:

  -d, --body=<value>      The request body (JSON string).
      --describe=<value>  Print a reference for an endpoint
      -H, --header=<value>    Additional HTTP header(s). Pass a
  -l, --list-endpoints    List all available Apify API
      -X, --method=<option>   The HTTP method to use. Defaults
  -p, --params=<value>    Query parameters as a JSON object,
      --profile=<value>   The stored account to use for this

After:

  -d, --body=<value>      The request body (JSON string).
      --describe=<value>  Print a reference for an endpoint
  -H, --header=<value>    Additional HTTP header(s). Pass a
  -l, --list-endpoints    List all available Apify API
  -X, --method=<option>   The HTTP method to use. Defaults
  -p, --params=<value>    Query parameters as a JSON object,
      --profile=<value>   The stored account to use for this

Long-only flags such as --profile keep their four-space indent, which is what that branch is for.

Adds a regression test that fails on the old regex, and regenerates docs/reference.md.

🤖 Generated with Claude Code

The continuation-line indent check in `pushFlags()` was case-sensitive, so
flags with an uppercase short form (`-H`, `-X`) were treated as having no
short form and got four extra spaces.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@l2ysho l2ysho added adhoc Ad-hoc unplanned task added during the sprint. t-builders Issues owned by the Builders team. labels Nov 9, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/apify-cli@1562

commit: 5df1fe8

@l2ysho l2ysho self-assigned this Nov 9, 2026
@l2ysho
l2ysho requested a review from apify-factory November 9, 2026 13:51
@l2ysho
l2ysho marked this pull request as ready for review November 9, 2026 13:52
apify-factory
apify-factory previously approved these changes Nov 9, 2026

@apify-factory apify-factory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, nothing blocking.

🏭 Apify Factory auto approved ✅ — passed every gate without touching the sides

Every gate passed, and neither the reviewer nor a juror found anything a human needs to look at.

Approval locked to 86b478e60 · workflow run

@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Nov 9, 2026
@apify-factory
apify-factory dismissed their stale review November 10, 2026 08:50

Withdrawn because the content changed since the last verdict, and pushes are not re-reviewed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-builders Issues owned by the Builders team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants