Can I pass multiple arguments to grepprg?
Nobody has claimed this yet.
- Dominant language
- Vim Script
- Stars
- 1.2k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
I know we can pass the `$*`(the grep text) to `grepprg`, but can we also specify the root-directory I want to grep from? i.e.
```vim
let g:grepper = {
\ 'grep': {
\ 'grepprg': 'grep -Rn arg0_grep_text arg1_the_folder'
\ },
\ 'tools': ['grep']
\}
```
Then in vim:
```bash
:Grepper -tool grep -quickfix -highlight
# in prompt
grep -Rn arg0_grep_text arg1_the_folder> my-text-for-grep my-folder-path-for-grep
```
The `arg1_the_folder` really matters when your project too big and u need to limit the result in a given folder.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading how grepprg is handled in the :Grepper prompt flow, especially how the grep text is passed to the configured command. Confirm that the prompt can preserve both the search text and a root-folder argument, then verify that the resulting grep command limits results to that folder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vim
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100