6 items tagged “ripgrep”
2025
How to add a directory to your PATH. Classic Julia Evans piece here, answering a question which you might assume is obvious but very much isn't.
Plenty of useful tips in here, plus the best explanation I've ever seen of the three different Bash configuration options:
Bash has three possible config files:
~/.bashrc
,~/.bash_profile
, and~/.profile
.If you're not sure which one your system is set up to use, I'd recommend testing this way:
- add
echo hi there
to your~/.bashrc
- Restart your terminal
- If you see "hi there", that means
~/.bashrc
is being used! Hooray!- Otherwise remove it and try the same thing with
~/.bash_profile
- You can also try
~/.profile
if the first two options don't work.
This article also reminded me to try which -a again, which gave me this confusing result for datasette
:
% which -a datasette
/opt/homebrew/Caskroom/miniconda/base/bin/datasette
/Users/simon/.local/bin/datasette
/Users/simon/.local/bin/datasette
Why is the second path in there twice? I figured out how to use rg
to search just the dot-files in my home directory:
rg local/bin -g '/.*' --max-depth 1
And found that I have both a .zshrc
and .zprofile
file that are adding that to my path:
.zshrc.backup
4:export PATH="$PATH:/Users/simon/.local/bin"
.zprofile
5:export PATH="$PATH:/Users/simon/.local/bin"
.zshrc
7:export PATH="$PATH:/Users/simon/.local/bin"
2022
Weeknotes: Datasette 0.63.3, datasette-ripgrep
We’re back in the UK to see family over Christmas (our first trip back since 2019). Here are a few notes from the past couple of weeks.
[... 801 words]2020
Weeknotes: github-to-sqlite workflows, datasette-ripgrep enhancements, Datasette 0.52
This week: Improvements to datasette-ripgrep
, github-to-sqlite
and datasette-graphql
, plus Datasette 0.52 and a flurry of dot-releases.
datasette-ripgrep: deploy a regular expression search engine for your source code
This week I built datasette-ripgrep—a web application for running regular expression searches against source code, built on top of the amazing ripgrep command-line tool.
[... 1,362 words]2019
How FZF and ripgrep improved my workflow (via) I’m already a keen user of ripgrep (a crazy-fast grep alternative) but fzf was new to me: it’s a CLI utility that lets you pipe in a list of strings, then gives you a typeahead search interface to search and select a string before returning the selected string to stdout when you hit enter. This means you can pipe it together with other tools to add a dynamic selection step, which has all kinds of delightful combinations. “vi $(find . | fzf)” for example opens vi against the file you selected.
ripgrep is faster than {grep, ag, git grep, ucg, pt, sift}
(via)
Andrew Gallant's post from September 2016 introducing ripgrep, the command-line grep tool he wrote using Rust (on top of the Rust regular expression library also written by Andrew). ripgrep
is a beautifully designed CLI interface and is crazy fast, and this post describes how it gets its performance in a huge amount of detail, right down to comparing the different algorithmic approaches used by other similar tools.
I recently learned that ripgrep ships as part of VS Code, which is why VS Code's search-across-project feature is so fast. In fact, if you dig around in the OS X package you can find the rg
binary already installed on your mac:
find /Applications/Visual* | grep bin/rg