yannickperrenet / dotfiles

💛 My dotfiles.
https://github.com/yannickperrenet/iscripts
MIT License
3 stars 0 forks source link

ag issue: negating patterns with '!' in .gitignore after using '*' #14

Closed yannickperrenet closed 3 years ago

yannickperrenet commented 3 years ago

Example .gitignore

# Ignore everything
*

# Except
!vim/

Now running ag "text" . will not search the vim/ directory. In certain situations it is fine running ag -U "text" instead.

See: https://github.com/ggreer/the_silver_searcher/issues/168

yannickperrenet commented 3 years ago

Use ripgrep instead, which does not have this issue.

Reference: https://github.com/BurntSushi/ripgrep

yannickperrenet commented 3 years ago

Great feature comparison between ack, ag and rg: https://beyondgrep.com/feature-comparison/ (by the creator of ack).

Integralist commented 3 years ago

Thanks for the tip off towards -U --skip-vcs-ignores ❤️