Skip to content

Can I pass multiple arguments to grepprg? #249

@sihunqu123

Description

@sihunqu123

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.

let g:grepper = {
    \ 'grep': {
    \   'grepprg': 'grep -Rn arg0_grep_text  arg1_the_folder'
    \ },
    \ 'tools': ['grep']
    \}

Then in vim:

: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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions