Why not make --with-filename default even for e.g. "rg somestring" ? That seems like it could hinder adoption since grep does it and it's useful when piping to other commands. Is it enabled when you specify a directory (rg somestring .) ?
Ripgrep – A new command line search tool
11–20 of 219 posts
Re: Ripgrep – A new command line search tool
#12Rust is really staring to be seen in the wild now.
I am really happy to see Rust apps actually been written -- Rust programmers seem to be actually trying to replace the existing code lying around, instead of just insulting it and telling us how much better the world would be if we used their language.
Re: Ripgrep – A new command line search tool
#13Thanks for the detailed comparisons and writeup. I find this simple wrapper around grep(1) very fast and useful: http://www.pixelbeat.org/scripts/findrepo
Note that the key thing that `findrepo` doesn't support is respecting your .gitignore files. For example, in the Rust ecosystem, we often have a `target` directory in our projects that contains a lot of stuff we probably don't want to search. In fact, running `cargo new` will add that directory to your `.gitignore` automatically!
Tools like The Silver Searcher and ripgrep will ignore that directory (and all others like it) automatically.
There are other advantages to ripgrep. For example, every other tool that supports Unicode as well as ripgrep (that's `git grep` and GNU grep) experience a substantial slow down when trying to use more advanced Unicode features (like \w, -i, etc.). This is one of the things my benchmarks show.
Re: Ripgrep – A new command line search tool
#14nice, but does it compile and run on armhf? I don't see any binaries
https://github.com/japaric/rust-cross#tldr-ubuntu-example
(I haven't actually run it because I don't have an ARM linux device handy.)
Re: Ripgrep – A new command line search tool
#15 RUSTFLAGS="-C target-cpu=native" rustup run nightly cargo build --target x86_64-unknown-linux-musl --release --features simd-accelRe: Ripgrep – A new command line search tool
#16To build a static Linux binary with SIMD support, run this: RUSTFLAGS="-C target-cpu=native" rustup run nightly cargo build --target x86_64-unknown-linux-musl --release --features simd-accel
Note that I also distribute statically compiled executables with musl and SIMD enabled (using target-feature=+ssse3 instead of target-cpu=native): https://github.com/BurntSushi/ripgrep/releases
Re: Ripgrep – A new command line search tool
#17Re: Ripgrep – A new command line search tool
#18Re: Ripgrep – A new command line search tool
#19To build a static Linux binary with SIMD support, run this: RUSTFLAGS="-C target-cpu=native" rustup run nightly cargo build --target x86_64-unknown-linux-musl --release --features simd-accel
That's an awesome demonstration of how easy it is to swap out the libc in Rust. :-) Note that I also distribute statically compiled executables with musl and SIMD enabled (using target-feature=+ssse3 instead of target-cpu=native): https://github.com/BurntSushi/ripgrep/releases
Now I have to look up how I use cargo to build a static binary on FreeBSD, where I don't have to swap out libc.
> Note that I also distribute statically compiled executables with musl and SIMD enabled (using target-feature=+ssse3 instead of target-cpu=native): https://github.com/BurntSushi/ripgrep/releases
I took the flag from your blog post, thanks for pointing out the explicit feature flag. That will allow the binary to run on more cpus.
Re: Ripgrep – A new command line search tool
#20Rust is really staring to be seen in the wild now.
I agree, and I'm already using both ripgrep and rust-parallel ( https://github.com/mmstick/parallel , a gnu-parallel replacement which should probably get another name ). I am really happy to see Rust apps actually been written -- Rust programmers seem to be actually trying to replace the existing code lying around, instead of just insulting it and telling us how much better the world would be if we used their langua…
Rust fills roughly the same niche in my brain as old-school C++, except it also lets me do some rudimentary functional stuff, there are virtually no footguns, and the CLI tooling is out of this world. And I've long since made friends with the borrow checker. So it's tempting to just spend my life cranking out Rust code as fast as I can. It's actually a problem. :-)