summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-03-12Bump and update deps.wincolor-0.1.3termcolor-0.3.1ignore-0.1.8grep-0.1.6globset-0.1.4Andrew Gallant
2017-03-12Add new -M/--max-columns option.Ralf Jung
This permits setting the maximum line width with respect to the number of bytes in a line. Omitted lines (whether part of a match, replacement or context) are replaced with a message stating that the line was elided. Fixes #129
2017-03-12pin nightlyAndrew Gallant
2017-03-12Improve docs for --glob flag.Andrew Gallant
Fixes #345.
2017-03-12Clarify -u/--unrestricted flags.Andrew Gallant
Fixes #340
2017-03-12No line numbers when searching only stdin.Andrew Gallant
This changes the default behavior of ripgrep to *not* show line numbers when it is printing to a tty and is only searching stdin. Fixes #380 [breaking-change]
2017-03-12Stop aggressive inlining.Andrew Gallant
It's not clear what exactly is happening here, but the Read implementation for text decoding appears a bit sensitive. Small pertubations in the code appear to have a nearly 100% impact on the overall speed of ripgrep when searching UTF-16 files. I haven't had the time to examine the generated code in detail, but `perf stat` seems to think that the instruction cache is performing a lot worse when the code slows down. This might mean that excessive inlining causes a different code structure that leads to less-than-optimal icache usage, but it's at best a guess. Explicitly disabling the inline for the cold path seems to help the optimizer figure out the right thing.
2017-03-12Add support for additional text encodings.Andrew Gallant
This includes, but is not limited to, UTF-16, latin-1, GBK, EUC-JP and Shift_JIS. (Courtesy of the `encoding_rs` crate.) Specifically, this feature enables ripgrep to search files that are encoded in an encoding other than UTF-8. The list of available encodings is tied directly to what the `encoding_rs` crate supports, which is in turn tied to the Encoding Standard. The full list of available encodings can be found here: https://encoding.spec.whatwg.org/#concept-encoding-get This pull request also introduces the notion that text encodings can be automatically detected on a best effort basis. Currently, the only support for this is checking for a UTF-16 bom. In all other cases, a text encoding of `auto` (the default) implies a UTF-8 or ASCII compatible source encoding. When a text encoding is otherwise specified, it is unconditionally used for all files searched. Since ripgrep's regex engine is fundamentally built on top of UTF-8, this feature works by transcoding the files to be searched from their source encoding to UTF-8. This transcoding only happens when: 1. `auto` is specified and a non-UTF-8 encoding is detected. 2. A specific encoding is given by end users (including UTF-8). When transcoding occurs, errors are handled by automatically inserting the Unicode replacement character. In this case, ripgrep's output is guaranteed to be valid UTF-8 (excluding non-UTF-8 file paths, if they are printed). In all other cases, the source text is searched directly, which implies an assumption that it is at least ASCII compatible, but where UTF-8 is most useful. In this scenario, encoding errors are not detected. In this case, ripgrep's output will match the input exactly, byte-for-byte. This design may not be optimal in all cases, but it has some advantages: 1. In the happy path ("UTF-8 everywhere") remains happy. I have not been able to witness any performance regressions. 2. In the non-UTF-8 path, implementation complexity is kept relatively low. The cost here is transcoding itself. A potentially superior implementation might build decoding of any encoding into the regex engine itself. In particular, the fundamental problem with transcoding everything first is that literal optimizations are nearly negated. Future work should entail improving the user experience. For example, we might want to auto-detect more text encodings. A more elaborate UX experience might permit end users to specify multiple text encodings, although this seems hard to pull off in an ergonomic way. Fixes #1
2017-03-12Fixes #394 - Added in svg to the types fileJoshua Horwitz
2017-03-12Add license files to each crate.Andrew Gallant
Fixes #381
2017-03-12Add scss and ejs.Andrew Gallant
We add scss to the existing `css` file type and `ejs` to the existing `html` file type. Fixes #393
2017-03-12Fix test on Windows.Andrew Gallant
(This is what I get for directly pushing to master.)
2017-03-12Fix leading slash bug when used with `!`.Andrew Gallant
When writing paths like `!/foo` in gitignore files (or when using the -g/--glob flag), the presence of `!` would prevent the gitignore builder from noticing the leading slash, which causes absolute path matching to fail. Fixes #405
2017-03-09Add _rg.ps1 to windows zipDaniel Santa Cruz
Tested with local cargo build paths.
2017-03-08update depsAndrew Gallant
2017-03-08Add "Known issues" section in README.mdJean-Marie Comets
Also document that ctrl-c doesn't restore the termcolor. Fixes #347.
2017-03-08Remove regex build-dependency in Cargo.tomlMarc Tiehuis
2017-03-08Remove clap validator + add max-filesize integration testsMarc Tiehuis
2017-03-08Reduce unnecessary stat calls for max_filesizeMarc Tiehuis
2017-03-08Add `--max-filesize` option to clitiehuis
The --max-filesize option allows filtering files which are larger than the specified limit. This is potentially useful if one is attempting to search a number of large files without common file-types/suffixes. See #369.
2017-03-08Add file size exclusion to walkertiehuis
A maximum filesize can be specified as an argument to a `WalkBuilder`. If a file exceeds the specified size it will be ignored as part of the resulting file/directory set. The filesize limit never applies to directories.
2017-03-08Add enclosing group to alternations in globsMarc Tiehuis
Fixes #391.
2017-03-01Added Chocolatey to the installation listDavid Salter
2017-02-25bump clap to 2.20.5Andrew Gallant
Fixes #383
2017-02-25update env_logger to 0.4Igor Gnatenko
2017-02-24kick travisAndrew Gallant
2017-02-23Add .log as FileTypedeepy
2017-02-19fix badgesAndrew Gallant
2017-02-19use termcolor 0.3, not 0.1Andrew Gallant
2017-02-18Tweak how binary files are handled internally.Andrew Gallant
This commit fixes two issues. The first issue is that if a file contained many NUL bytes without any LF bytes, then the InputBuffer would read the entire file into memory. This is not typically a problem, but if you run rg on /proc, then bad things can happen when reading virtual memory mapping files. Arguably, such files should be ignored, but we should also try to avoid exhausting memory too. We fix this by pushing the `-a/--text` flag option down into InputBuffer, so that it knows to stop immediately if it finds a NUL byte. The other issue this fixes is that binary detection is now applied to every buffer instead of just the first one. This helps avoid detecting too many files as plain text if the first parts of a binary file happen to contain no NUL bytes. This issue still persists somewhat in the memory map searcher, since we probably don't want to search the entire file upfront for NUL bytes before actually performing our search. Instead, we search the first 10KB for now. Fixes #52, Fixes #311
2017-02-18Don't parses regexes with --files.Andrew Gallant
When the --files flag is given, ripgrep would still try to parse some of the positional arguments as regexes. Don't do that. Fixes #326
2017-02-18Permit --heading to override --no-heading.Andrew Gallant
@kbknapp <3 Fixes #327
2017-02-18update termcolor depAndrew Gallant
2017-02-18termcolor-0.3.0termcolor-0.3.0Andrew Gallant
2017-02-18Remove Windows deps from ripgrep proper.Andrew Gallant
All Windows specific code has been (mostly) pushed out of ripgrep and into its constituent libraries.
2017-02-18Implement Hash for Glob, and re-implement PartialEq using only non-redundant ↵Stu Hood
fields.
2017-02-12Remove lazy_static from globsetAndrew Gallant
2017-02-09termcolor: add support for output to standard errorPeter Williams
This is essentially a rename of the existing `Stdout` type to `StandardStream` and a change of its constructor from a single `new()` function to have two `stdout()` and `stderr()` functions. Under the hood, we add add internal IoStandardStream{,Lock} enums that allow us to abstract between Stdout and Stderr conveniently. The rest of the needed changes then fall out fairly naturally. Fixes #324. [breaking-change]
2017-02-09Add .twig as a FiletypeAhmed El Gabri
2017-01-31add '*.sass' to sass typeSamuel Colvin
2017-01-30Look for global git/ignore in ~/.config/git, not ~/gitDaniel Hahler
The documentation says: > If `$XDG_CONFIG_HOME` is not set or is empty, then > `$HOME/.config/git/ignore` is used instead. This is the expected behavior, but the code looked at ~/git/ignore instead.
2017-01-24Add Ceylon file type filteringAlexander Altman
2017-01-21Add 'text-processing' category.Andrew Gallant
2017-01-20 Add categories to Cargo.tomlJake Goulding
2017-01-19Fix homebrew formulaDavid Stangl
2017-01-18Add shell completion files to ripgrep-bin.rbTareq A Khandaker
2017-01-18File Types: Add .eex under Elixirrobi-wan
.eex is the default file ending for templates using Elixir's template engine EEx.
2017-01-17update depsAndrew Gallant
2017-01-17wincolor-0.1.2wincolor-0.1.2Andrew Gallant
2017-01-17Update 0.4.0 changelog.Andrew Gallant
It was missing a change about colors/styles. Fixes #330