New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer .ignore to .agignore. #974

Merged
merged 4 commits into from Sep 24, 2016

Conversation

Projects
None yet
5 participants
@ggreer
Owner

ggreer commented Sep 24, 2016

Thanks to discussion on https://news.ycombinator.com/item?id=12564442, @BurntSushi and I agreed on a common file name for ignore patterns. He's made his PR for ripgrep. This is ag's counterpart.

To those who worry about change: Please don't! It will be a long time before .agignore is no longer obeyed, if ever.

@ggreer ggreer merged commit c41ce6c into master Sep 24, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

BurntSushi added a commit to BurntSushi/ripgrep that referenced this pull request Sep 24, 2016

Switch from .rgignore to .ignore.
But don't actually remove support for .rgignore until the next semver
bump.

Note that this puts us in line with the silver searcher:
ggreer/the_silver_searcher#974

Fixes #40

amsharma91 pushed a commit to amsharma91/ripgrep that referenced this pull request Sep 27, 2016

amsharma91
Switch from .rgignore to .ignore.
But don't actually remove support for .rgignore until the next semver
bump.

Note that this puts us in line with the silver searcher:
ggreer/the_silver_searcher#974

Fixes BurntSushi#40

amsharma91 added a commit to amsharma91/ripgrep that referenced this pull request Sep 27, 2016

Switch from .rgignore to .ignore.
But don't actually remove support for .rgignore until the next semver
bump.

Note that this puts us in line with the silver searcher:
ggreer/the_silver_searcher#974

Fixes BurntSushi#40
@@ -195,13 +195,13 @@ run `ag --list-file-types`.
## IGNORING FILES
By default, ag will ignore files whose names match patterns in .gitignore,
.hgignore, or .agignore. These files can be anywhere in the directories being
.hgignore, or .ignore. These files can be anywhere in the directories being
searched. Ag also ignores files matched by the svn:ignore property if `svn
--version` is 1.6 or older. Finally, ag looks in $HOME/.agignore for ignore

This comment has been minimized.

@jonathanjouty

jonathanjouty Oct 2, 2016

Finally, ag looks in $HOME/.agignore

Shouldn't it now say $HOME/.ignore?

@jonathanjouty

jonathanjouty Oct 2, 2016

Finally, ag looks in $HOME/.agignore

Shouldn't it now say $HOME/.ignore?

This comment has been minimized.

@krigstask

krigstask May 15, 2017

Seems like ag 1.0.3 doesn't take ~/.ignore into account at all (still ignoring patterns from ~/.agignore).

@krigstask

krigstask May 15, 2017

Seems like ag 1.0.3 doesn't take ~/.ignore into account at all (still ignoring patterns from ~/.agignore).

@jonathanjouty

This comment has been minimized.

Show comment
Hide comment
@jonathanjouty

jonathanjouty Oct 2, 2016

Good work on agreeing to commonly use .ignore! Only just caught up with this on HackerNews, so sorry for being late to the game...

I have a minor quibble...
As you're keeping support for .agignore, you should mention in the documentation that this is still part of current behaviour, and will be discontinued on some future release.

I imagine some poor soul git cloneing a repository with a .agignore, breaking their head over why they can't ag what they are looking for...

Also relevant for BurntSushi/ripgrep#41

jonathanjouty commented Oct 2, 2016

Good work on agreeing to commonly use .ignore! Only just caught up with this on HackerNews, so sorry for being late to the game...

I have a minor quibble...
As you're keeping support for .agignore, you should mention in the documentation that this is still part of current behaviour, and will be discontinued on some future release.

I imagine some poor soul git cloneing a repository with a .agignore, breaking their head over why they can't ag what they are looking for...

Also relevant for BurntSushi/ripgrep#41

@davidosomething

This comment has been minimized.

Show comment
Hide comment
@davidosomething

davidosomething Dec 9, 2016

In case anyone needs clarification:

  • CURRENTDIR or PARENTDIRS/.ignore is the local ignore file
  • ~/.agignore is global and included in every search, pretty much appended to the bottom of your local .ignore

davidosomething commented Dec 9, 2016

In case anyone needs clarification:

  • CURRENTDIR or PARENTDIRS/.ignore is the local ignore file
  • ~/.agignore is global and included in every search, pretty much appended to the bottom of your local .ignore

casimir referenced this pull request in jwilm/alacritty Jan 10, 2017

Add silver searcher ignore file
Searching on the ref tests would find matches in the terminal recording
files and completely screw up the screen state.
@rafi

This comment has been minimized.

Show comment
Hide comment
@rafi

rafi Feb 16, 2017

It would be great if ag could search for it in ~/.config/ag/ignore also.

rafi commented Feb 16, 2017

It would be great if ag could search for it in ~/.config/ag/ignore also.

backus added a commit to backus/clarity that referenced this pull request Jul 5, 2017

Add .ignore file for better `ag`
Ag and ripgrep both respect .ignore. See ggreer/the_silver_searcher#974

devonzuegel pushed a commit to devonzuegel/clarity that referenced this pull request Jul 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment