summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-01-17Add stderr support to wincolor.Peter Williams
2017-01-15Replace internal atty module with atty crate.Andrew Gallant
This removes all use of explicit unsafe in ripgrep proper except for one: accessing the contents of a memory map. (Which may never go away.)
2017-01-14note minimum Rust versionAndrew Gallant
2017-01-14update brew tapAndrew Gallant
2017-01-130.4.00.4.0Andrew Gallant
2017-01-13changelog 0.4.0Andrew Gallant
2017-01-13Fix invalid UTF-8 output on Windows.Andrew Gallant
Currently, Rust's standard library will yield an error if one tries to write invalid UTF-8 to a Windows console. This is problematic for ripgrep when it tries to print matched lines that contain invalid UTF-8. We work around this by modifying the `termcolor` library to lossily decode UTF-8 before sending it to `std::io::Stdout`. This may result in some Unicode replacement chars being shown in the output, but this is strictly better than erroring or not showing anything at all. Fixes #318.
2017-01-13update same-file depAndrew Gallant
2017-01-13Use basic SGR sequences when possible.Andrew Gallant
In Emacs, its terminal apparently doesn't support "extended" sets of foreground/background colors. Unless we need to set an "intense" color, we should instead use one of the eight basic color codes. Also, remove the "intense" setting from the default set of colors. It doesn't do much anyway and enables the default color settings to work in Emacs out of the box. Fixes #182 (again)
2017-01-11Make --column imply --line-number.Andrew Gallant
Closes #243
2017-01-10another bytecount update, weirdAndrew Gallant
2017-01-10update bytecountAndrew Gallant
Fixes #313
2017-01-10Add --path-separator flag.Andrew Gallant
This flag permits setting the path separator used for all file paths printed by ripgrep in normal operation. Fixes #275
2017-01-10Add example to -r/--replace docs.Andrew Gallant
Fixes #308
2017-01-09fix minimum Rust versionAndrew Gallant
2017-01-09remove redundant wordsAndrew Gallant
2017-01-09add anti-pitchAndrew Gallant
2017-01-09Don't search stdout redirected file.Andrew Gallant
When running ripgrep like this: rg foo > output we must be careful not to search `output` since ripgrep is actively writing to it. Searching it can cause massive blowups where the file grows without bound. While this is conceptually easy to fix (check the inode of the redirection and the inode of the file you're about to search), there are a few problems with it. First, inodes are a Unix thing, so we need a Windows specific solution to this as well. To resolve this concern, I created a new crate, `same-file`, which provides a cross platform abstraction. Second, stat'ing every file is costly. This is not avoidable on Windows, but on Unix, we can get the inode number directly from directory traversal. However, this information wasn't exposed, but now it is (through both the ignore and walkdir crates). Fixes #286
2017-01-09add Kotlin type: "*.kt", "*.kts"chocolateboy
https://en.wikipedia.org/wiki/Kotlin_(programming_language) https://github.com/udalov/kotlin-vim/blob/master/ftdetect/kotlin.vim
2017-01-09Ruby type: add "Gemfile", "*.gemspec", ".irbrc", "Rakefile"chocolateboy
https://github.com/vim-ruby/vim-ruby/blob/master/ftdetect/ruby.vim
2017-01-09Perl type: add "*.t"chocolateboy
https://github.com/petdance/ack2/blob/2.15_02/ConfigDefault.pm#L155
2017-01-09add Crystal type: "Projectfile", "*.cr"chocolateboy
https://en.wikipedia.org/wiki/Crystal_(programming_language) https://github.com/rhysd/vim-crystal/blob/master/ftdetect/crystal.vim
2017-01-08Sync documented threads cap to code.Daniel Luz
2017-01-08Remove trivial condition.Daniel Luz
2017-01-07Fix type compose test.Andrew Gallant
2017-01-07Provide a mechanism to compose type definitionsIan Kerins
This extends the syntax of the --type-add flag to allow including the globs of other already defined types. Fixes #83.
2017-01-06Add docs for shell completion files.Andrew Gallant
Add small howtos for installing shell completion files to the README and the man page. They are still incomplete. We're missing Zsh and PowerShell. Fixes #262
2017-01-06Fix spacing issue in --help output.Andrew Gallant
2017-01-06Add --sort-files flag.Andrew Gallant
When used, parallelism is disabled but the results are sorted by file path. Closes #263
2017-01-06Tweak the parallel directory iterator.Andrew Gallant
This commit fixes two issues. First, the iterator was executing the callback for every child of a directory in a single thread. Therefore, if the walker was run over a single directory, then no parallelism is used. We tweak the iterator slightly so that we don't fall into this trap. The second issue is a bit more subtle. In particular, we don't use the blocking semantics of MsQueue because we *don't know when iteration finishes*. This means that if there are a bunch of idle workers because there is no work available to them, then they will spin and burn the CPU. One case where this crops up is if you pipe the output of ripgrep into `less` *and* the total number of files to search is fewer than the number of threads ripgrep uses. We "fix" this with a very stupid heuristic: when the queue yields no work, we sleep the thread for 1ms. This still pegs the CPU, but not nearly as much as before. If one really want to avoid this behavior when using ripgrep, then `-j1` can be used to disable parallelism. Fixes #258
2017-01-06Rejigger bold and intense settings.Andrew Gallant
Previously, ripgrep would only emit the 'bold' ANSI escape sequence if no foreground or background color was set. Instead, it would convert colors to their "intense" versions if bold was set. The intent was to do the same thing on Windows and Unix. However, this had a few negative side effects: 1. Omitting the 'bold' ANSI escape when 'bold' was set is surprising. 2. Intense colors can look quite bad and be hard to read. To fix this, we introduce a new setting called 'intense' in the --colors flag, and thread that down through to the public API of the `termcolor` crate. The 'intense' setting has environment specific behavior: 1. In ANSI mode, it will convert the selected color to its "intense" variant. 2. In the Windows console, it will make the text "intense." There is no longer any "smart" handling of the 'bold' style. The 'bold' ANSI escape is always emitted when it is selected. In the Windows console, the 'bold' setting now has no effect. Note that this is a breaking change. Fixes #266, #293
2017-01-06Add powershell as a known file typeJason Shirk (POWERSHELL)
2017-01-03bump depsAndrew Gallant
2017-01-02Tweak build matrix.Andrew Gallant
Only build darwin on nightly for deployment. (Darwin builders are quite slow on Travis.) Also, add MUSL to Rust 1.12.0 builder.
2017-01-01Update to regex 0.2.Andrew Gallant
2016-12-30bump various versionsAndrew Gallant
2016-12-29Add types for handling SWIG files. (#297)Matěj Cepl
SWIG from http://swig.org/ Fixes #296
2016-12-27Remove superfluous memmap dependency in `grep` crate.Andrew Gallant
Fixes #295.
2016-12-24Remove special ^C handling.Andrew Gallant
This means that ripgrep will no longer try to reset your colors in your terminal if you kill it while searching. This could result in messing up the colors in your terminal, and the fix is to simply run some other command that resets them for you. For example: $ echo -ne "\033[0m" The reason why the ^C handling was removed is because it is irrevocably broken on Windows and is impossible to do correctly and efficiently in ANSI terminals. Fixes #281
2016-12-24add docs to wincolorAndrew Gallant
2016-12-24Small code cleanups.Andrew Gallant
2016-12-24Remove ~ dependency on clap.Andrew Gallant
The point of the ~ dependency was to avoid implicitly increasing the minimum Rust version required to compile ripgrep. However, clap's policy is to support at least two prior releases of Rust (which roughly corresponds to the convention that others use too), and that is probably good enough. The problem with using a ~ dependency is that it can make packaging ripgrep in Linux distros difficult, because it means the packager may be forced to package multiple compatible versions of the same library. Fixes #271
2016-12-24Add some additional benchmark runs.Andrew Gallant
2016-12-24-archlinux-cheetah uses the same setup/compile config as 2016-09-22-archlinux-cheetah. The improvements are nice. The other 2016-12-24-archlinux-cheetah-* benchmarks try to suss out a difference between MUSL, glibc, jemalloc and the system allocator.
2016-12-24Add some commented out commands to compile script.Andrew Gallant
2016-12-24Add --disabled flag to benchsuite.Andrew Gallant
This allows one to selectively choose which commands aren't benchmarked.
2016-12-24update depsAndrew Gallant
2016-12-23fix some clippy lints (#288)Leonardo Yvens
2016-12-23Update Cargo.lock to bring in clap 2.19.2 fix for ZSH completions. (#287)Lilian Anatolie Moraru
2016-12-22Update docs to explain use of -g and --files to search for paths. (#285)YPCrumble
Update docs to explain use of -g and --files to search for paths. Fixes #284
2016-12-12Make backreference support clear.Andrew Gallant
Fixes #268.