When a query finds nothing, shaha exits with a non-zero status code:
if results.is_empty() {
bail!("No matches found");
}
This makes scripting awkward — you can't distinguish "query failed" from "query succeeded but found nothing" without parsing stderr. Standard tools like grep handle this with exit code 1 for no matches vs exit code 2 for actual errors.
For a tool that's useful in pipelines (CTF scripts, batch lookups), "no match" should be exit 0 with empty output, or a dedicated exit code separate from general errors.
When a query finds nothing, shaha exits with a non-zero status code:
This makes scripting awkward — you can't distinguish "query failed" from "query succeeded but found nothing" without parsing stderr. Standard tools like
grephandle this with exit code 1 for no matches vs exit code 2 for actual errors.For a tool that's useful in pipelines (CTF scripts, batch lookups), "no match" should be exit 0 with empty output, or a dedicated exit code separate from general errors.