WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@Pruthvi-Parmar
Copy link

Problem

Fixes #1312

The show files command lists all bucket paths but cannot be filtered. Passing --bucket or other filter options results in "unknown option" errors, making it difficult to inspect specific subsets of files in large repositories.

Solution

Added three filter options to the show files command, mirroring the run command:

  • --bucket <bucket> - Filter by bucket type (repeatable)
  • --target-locale <code> - Filter by target locale (repeatable)
  • --file <substr> - Filter by file path pattern (repeatable)

Testing

  • All filters work independently
  • All filters work in combination
  • Repeatable pattern works correctly
  • No linter errors
  • Backward compatible

Examples

# Single filters
show files --bucket json -y
show files --target-locale es -y
show files --file messages -y

# Combined filters
show files --bucket mdx --target-locale fr --file readme -y

Implementation

Follows the same pattern as the run command in packages/cli/src/cli/cmd/run/plan.ts

Add --bucket, --target-locale, and --file filter options to the
show files command, mirroring the filtering capabilities available
in the run command.

Fixes lingodotdev#1312
Copy link
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

This PR adds filter options to the show files command to allow users to filter file paths by bucket type, target locale, and file path patterns. This addresses the issue where the command previously listed all bucket paths without filtering capabilities.

Key changes:

  • Added three new filter options: --bucket, --target-locale, and --file (all repeatable)
  • Implemented filtering logic for buckets, target locales, and file path patterns using substring matching and glob patterns
  • Added minimatch import for glob pattern support

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

fix: correct file filter matching logic

Co-authored-by: Copilot <[email protected]>
@Pruthvi-Parmar
Copy link
Author

correct file filter matching logic

Copilot finished reviewing on behalf of maxprilutskiy November 24, 2025 20:11
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.

Add filters to show files

1 participant