Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix: fall back to `grep` when `rg` is not available

hippietrail0b3f1f0f0904
diff --git a/justfile b/justfile
index e4359371e..07dbf791b 100644
--- a/justfile
+++ b/justfile
@@ -260,7 +260,12 @@ addnoun noun:
# Search Harper's curated dictionary for a specific word
searchdictfor word:
- cargo run --bin harper-cli -- words | rg {{word}}
+ #! /bin/bash
+ if command -v rg > /dev/null; then
+ cargo run --bin harper-cli -- words | rg {{word}}
+ else
+ cargo run --bin harper-cli -- words | grep {{word}}
+ fi
# Find words in the user's `harper-ls/dictionary.txt` for words already in the curated dictionary.
userdictoverlap: