the_silver_searcher: --files-without-matches does not work properly
-l and -L should be mutually exclusive, but they are not.
A simple example illustrating the issue:
zsh 12550 % echo test123 > file
zsh 12551 % ag -L test file
file
zsh 12552 % ag -l test file
file
zsh 12548 % ag --version
ag version 0.15
About this issue
- Original URL
- State: open
- Created 11 years ago
- Reactions: 2
- Comments: 15 (3 by maintainers)
Any updates on this?
-Lcompletely ignores matches on the first line of the file. Seems like if this isn’t going to be fixed soon, the flag should be removed entirely, as it effectively does not work as advertised at all.I believe this issue should be closed, as a dupe of many other issues, because it should be fixed once and for all by #1245, which has been merged for some months now. /cc @ggreer
Still an issue… I spent 30 minutes trying to understand why a file was showing in both
ag -landag -L…Looks like
ag -Lignores a file’s last line.grepgets it right:Still valid today. What was reported by @serhalp is still true.
It’s still an issue with current master (630125a). The issue seems to be that -L ignores matches on the first line of the file.