Skip to content

Quote glob pattern examples in --include/--exclude docs to prevent shell expansion#490

Merged
swissspidy merged 4 commits intomainfrom
copilot/update-glob-examples-quotation
Apr 21, 2026
Merged

Quote glob pattern examples in --include/--exclude docs to prevent shell expansion#490
swissspidy merged 4 commits intomainfrom
copilot/update-glob-examples-quotation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

Shell globbing expands unquoted patterns like --exclude=foo-*.php before WP-CLI sees them, producing silent unexpected behavior when matching files exist in the current directory.

Changes

  • src/MakePotCommand.php — Quote glob examples in --include and --exclude option docs
  • src/AuditCommand.php — Quote glob example in --exclude option docs
  • README.md — Mirror the same fixes across all three occurrences

Before:

Simple glob patterns can be used, i.e. `--exclude=foo-*.php`

After:

Simple glob patterns can be used, i.e. `--exclude="foo-*.php"`

Copilot AI changed the title [WIP] Update glob examples for include/exclude with quotes Quote glob pattern examples in --include/--exclude docs to prevent shell expansion Apr 21, 2026
Copilot AI requested a review from swissspidy April 21, 2026 08:45
@github-actions github-actions Bot added command:i18n-make-pot Related to 'i18n make-pot' command scope:documentation Related to documentation labels Apr 21, 2026
@swissspidy swissspidy added this to the 2.7.3 milestone Apr 21, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy marked this pull request as ready for review April 21, 2026 09:07
@swissspidy swissspidy requested a review from a team as a code owner April 21, 2026 09:07
Copilot AI review requested due to automatic review settings April 21, 2026 09:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates CLI documentation examples to ensure glob patterns in --include/--exclude are quoted so shells don’t expand them before WP-CLI receives the arguments.

Changes:

  • Quote glob pattern examples for --include and --exclude in command docblocks.
  • Mirror the same quoting updates in README.md for the rendered docs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/MakePotCommand.php Quotes glob examples in --include/--exclude option docs.
src/AuditCommand.php Quotes glob example in --exclude option docs.
README.md Mirrors the quoted glob examples in the generated/hand-maintained docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/MakePotCommand.php Outdated
Comment thread README.md Outdated
swissspidy and others added 2 commits April 21, 2026 11:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@swissspidy swissspidy merged commit f7d9693 into main Apr 21, 2026
73 checks passed
@swissspidy swissspidy deleted the copilot/update-glob-examples-quotation branch April 21, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:i18n-make-pot Related to 'i18n make-pot' command scope:documentation Related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"glob" examples for include/exclude should be quoted to prevent unexpected behavior

3 participants