Comments (32)
Also seeing this on latest Ag + Sierra
from the_silver_searcher.
I too am seeing this with ag 0.30.0 on OSX 10.10.5
from the_silver_searcher.
I can confirm that the bug is present in 0.31.0 from homebrew on OS X 10.11.1.
from the_silver_searcher.
@chetan, please reopen this issue, as it's still relevant
from the_silver_searcher.
Same problem happens with ag version 2.2.0
.
from the_silver_searcher.
@ggreer Can this issued be reopened? If not we should open a new issue. I'm getting matches of artifact files that are in gitignore.
ag version 2.1.0
Features:
+jit +lzma +zlib
git --version
git version 2.16.2
from the_silver_searcher.
Just tried with the latest silver searcher from homebrew (2.1.0). @chetan Can we reopen this?
**/dist doesnt is ignored but something like /dist works. even though their is no /dist and I want to target nested dists.
from the_silver_searcher.
The bug is also in 0.32.0 from homebrew on OSX 10.11.5.
from the_silver_searcher.
This is a bit annoying since I am using it in vim and it tries to search through compiled files.
from the_silver_searcher.
Thanks for the repo. I can reproduce. I'm pretty sure I know where the problem is, but it'll probably be a few days before I have the time to dive into this.
from the_silver_searcher.
Probably related, but even something like log/log.log
does not work.
from the_silver_searcher.
Confirmed. Looks like the method filename_ignore_search() only takes the filename portion as a param and not the full (relative?) path as well. Updated my test repo.
from the_silver_searcher.
Yeah... my bad. I'm pretty busy now, but I will be not-busy starting October 30th. I'll definitely get to this then.
from the_silver_searcher.
Ok, try master now.
from the_silver_searcher.
Fix looks good for the original issues. Another small variation is if you only specify a subdir, e.g., log
or log/
, it won't match unless you add a glob pattern like log/*
. I updated the test repo to reflect this.
from the_silver_searcher.
Bleh. I had a return value wrong. Everything should work now.
from the_silver_searcher.
looks good!
from the_silver_searcher.
I discovered another bug while fixing this, but most people won't notice it and the current fix kills performance. I'll have to think of a different solution before merging a fix into master.
from the_silver_searcher.
@ggreer does it have anything to do with processing ignore files found in subdirectories? :)
from the_silver_searcher.
Huh. June 2015 and I'm still seeing this bug. A gitignore with log/*.log
does not work; that is, ag
returns results from the ignored log files. If I change that to just log/
or log
, it works correctly. There's no leading slash problem (Issue #285). Just installed the latest copy of ag
via homebrew. Any ideas why I still might be seeing this?
from the_silver_searcher.
Same here... on linux with latest build.
from the_silver_searcher.
Same error occurs with ag version 0.30.0
.
from the_silver_searcher.
I'm seeing the same issue with 0.30.0 installed via homebrew.
Note that the trailing .log
in @aeonaut's example isn't causing the problem. I'm seeing the same issue with a pattern like build/*
. ag respects build/
but ignores build/*
.
from the_silver_searcher.
This issue appears to be present in 0.31.0 from homebrew on OS X 10.11.1.
from the_silver_searcher.
I just ran into the same issue as @jamesgecko
from the_silver_searcher.
Confirmed on 0.33.0, OSX Sierra
from the_silver_searcher.
Ag version 1.0.2
macOS Sierra 10.12.2
At first I thought there is some issue with ag
, then I found that path was not configured properly in .gitignore
. After correcting that, ag
started ignoring the files.
from the_silver_searcher.
Something like this: web/js/*
expression in my .gitignore
is being ignore by ag, i.e it's searching inside those directories & not ignoring it.
The above expressions works fine for git grep
command that means it's a valid expression.
from the_silver_searcher.
Re-opening due to popular demand, though I don't currently use ag
myself.
from the_silver_searcher.
This is getting too annoying. Is there a replacement for ag
?
from the_silver_searcher.
Not sure what's going on here. I am on version 2.2.0 (installed with homebrew). I added the following little zsh to my profile. Now I have to call mag
instead of ag
. =/
##
# Maps contents of gitignore into --ignore ___ option flags for `ag`
##
function agIgnore() {
declare ignore=""
for thing in $(< .gitignore); do
ignore="$ignore --ignore '$thing'"
done
echo $ignore
}
alias mag='ag $(agIgnore)'
from the_silver_searcher.
Having the same issue suddenly. Using version 2.1.0-1 on Ubuntu 18.04. ag
has been my daily driver for years now for any kind of searching task. It's a shame to see such a major issue go unaddressed for so long. I'm going to roll with @papaben's workaround for now, but hope to see this addressed with a patch at some point.
from the_silver_searcher.
Related Issues (20)
- Running any search within a specific directory opens a file in that directory in Visual Studio
- Anyone want to help with a friendly fork of this project? HOT 6
- --make file type...
- Travis CI badge is broken
- Compilation stoped on qualifier from pointer target type [-Wcast-qual] HOT 1
- "bus error" on Mac OS with specific test file and regex HOT 1
- ag not finding accent letters in case insensitive search explicitly with -i option
- If the file doesn't exist, skip search instead of throwing errors
- wrong output on osx default terminal
- Confused about flag `--print-long-lines`: long lines seem to be printed by default? But can't turn that behavior *off* or modify it? (like `--print-long-lines=false` or `--print-long-lines=200` or something?)
- 2.2.0: test suite uses cram which is no longer maintained
- Add per-directory .gitignore support
- ignore patterns should not directory below their source file
- ag incorrectly parses [.][^.]*$
- feat: include OSC8 escape codes in output
- memory leak in function 'parse_options' HOT 1
- ag does not work on tmpfs/cgroup filesystem
- Entries in .gitignore are applied to the wrong base directory
- Bash completion script is broken with bash-completion v2.12.0 HOT 1
- Missing `S_ISSOCK` for stdin check HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from the_silver_searcher.