I doubt it's a coincidence. There's a common pattern where a popular new topic/thing on HN generates a few reposts and posts of old articles about the popular new topic/thing.
I've looked into it before, but it looks like a fairly weighty process to go through.
It does look like someone is working on it though! https://github.com/x4121/ripgrep-ubuntu
ripgrep's releases do include binary debs, but there's no auto-update:
$ curl -LO https://github.com/BurntSushi/ripgrep/releases/download/0.10.0/ripgrep_0.10.0_amd64.deb
$ sudo dpkg -i ripgrep_0.10.0_amd64.deb
if command -V rg > /dev/null 2>&1; then
curvers="$(rg -V | cut -d' ' -f2)"
latestvers="$(curl -s "$latesturl" | jq -r .tag_name)"
if [ "$curvers" = "$latestvers" ]; then
echo "ripgrep is up to date"
(cd /tmp && curl -LO "$url" && sudo dpkg -i "$name")
echo "ripgrep updated from $curvers to $latestvers"
It might even be installable on older versions of Ubuntu.
Other locations like `/usr/local` or `/opt/linuxbrew` or somesuch might not be writable by the current user, and it seems they would like to avoid requiring root access.
Using /home/ like /opt/ is just weird. It seems the installer picks ~/.linuxbrew/ if the user doesn't have sudo privilege but no idea how it got to the conclusion of using /home/linuxbrew/ otherwise.
Also note that if you still have UUCP infrastructure, the name "cu" will collide with an already installed program.
In some simple tests on my Linux checkout, it is about an order of magnitude slower than ripgrep though. It looks like a good chunk of time is spent in gitignore filtering?
I don't think it has multi-line search, which is something I've learned that ag users happen to love, which is why it's in the most recent release of ripgrep. :-)
Ripgrep does have some neat advanced features though...
Another approach I've seen people take is to put `-M300` in your ripgrep config file, and then any super long lines are automatically omitted from output.
I consider .grepignore to be more comprehensible.
yes, that's the primary reason for me :)
alias g="git grep"
That's why I've switched to using it pretty exclusively now.
$ git clone --depth 1 https://github.com/BurntSushi/linux
$ cd linux
$ time LC_ALL=en_US.UTF-8 git grep -E '\w+_RESUME' | wc -l
maxmem 64 MB
$ time rg '\w+_RESUME' | wc -l
maxmem 26 MB
$ time LC_ALL=C git grep -E '\w+_RESUME' | wc -l
maxmem 63 MB
$ time LC_ALL=en_US.UTF-8 git grep -P '(*UCP)\w+_RESUME' | wc -l
maxmem 63 MB
$ time LC_ALL=C git grep -P '\w+_RESUME' | wc -l
maxmem 59 MB
$ time rg -P '\w+_RESUME' | wc -l
maxmem 24 MB
$ time rg -P --no-pcre2-unicode '\w+_RESUME' | wc -l
maxmem 24 MB