mhinz / mhinz/vim-grepper

Failed to catch the filename when grepping a file(NOT folder) with gnu-grep

Open
#247 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
1.2k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Grepper works well with folder:

```bash
:Grepper -tool grep -noprompt -quickfix -highlight -grepprg grep -n -i name ./src
```

While works bad with file:
```bash
:Grepper -tool grep -noprompt -quickfix -highlight -grepprg grep -n -i name ./package.json
```
which will produce a quickfix like(noticed that filename is not captured):
```text
2: "name": "bank-demo",||
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the two :Grepper commands from the issue, comparing folder and single-file input and the resulting quickfix entries. Trace the grep output parsing and quickfix filename handling used by the Vim plugin. Done means the single-file command retains ./package.json in its quickfix entry while folder searches continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.