Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new --args parameter for fd an rg search #1013

Merged
merged 4 commits into from
May 8, 2024
Merged

feat: new --args parameter for fd an rg search #1013

merged 4 commits into from
May 8, 2024

Conversation

LatentDream
Copy link
Contributor

@LatentDream LatentDream commented May 7, 2024

Please describe the problem you're trying to solve

With the new --args parameter, users can pass custom arguments to fd or rg, for example, search fd --args='-e -H'.

Related issue: Closes #962

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution

Parse the --args string into an array using the shell-words crate.

  • rebuilt the input without the --args parameter
  • pass the args to the rg and fd commands

Additional context

  • Tested on Windows and MacOS

@sxyazi sxyazi changed the title feat: new --args='...' parameter for fd an rg search feat: new --args parameter for fd an rg search May 8, 2024
Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

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

Thank you for contributing to this feature!

@sxyazi sxyazi merged commit 0ffba5c into sxyazi:main May 8, 2024
5 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new --args parameter to the search command
2 participants