Comments (13)
I should also note that as a temporary work around I've just adjusted the code to skip patterns starting with '/' so I don't miss important things.
from the_silver_searcher.
Would love to see this get added. Right now patterns like /log/*
are not being used for Ag's ignore. I'm running HEAD.
from the_silver_searcher.
Same here (though I'm running version 0.14
). The pattern that isn't getting ignored for me is /log/*.log
(for reference).
from the_silver_searcher.
Just ran into this problem also. Using patterns that begin with '/' is the best practice in large projects if the exact directory structure is known, so this really is a crucial feature.
My specific problem is having this in .gitignore:
/tmp/performance
Running ag blabla still returns matches from file tmp/performance/PERF-REPORT-234234234.html
from the_silver_searcher.
Just ran into this problem too. At first I thought that ag doesn't deal with gitignores in subfolders. Having support for this is IMO crucial, because look at for example the default gitignore of Rails projects:
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp
from the_silver_searcher.
Umm, 4148d6a seems to have reversed the proper handling of the leading /
in .gitignore
. Reverting that commit makes ag
do the right thing for me.
from the_silver_searcher.
Actually, reverting that commit will make ag treat slashes incorrectly. Instead of just ignoring /tmp
, it will ignore all files and directories named tmp
.
It's safer to show extra matches than to silently ignore a file that the user expects to be searched.
from the_silver_searcher.
Ahh, I see. So we really need something that prepends a .
for leading /
s
from the_silver_searcher.
I would love to see this fixed 😸
from the_silver_searcher.
This seems to be closed with #355
from the_silver_searcher.
That is correct.
from the_silver_searcher.
👍 Thanks for fixing this! ❤️
from the_silver_searcher.
Thanks 👌
from the_silver_searcher.
Related Issues (20)
- 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
- Depends on deprecated pcre library
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.