srcsearch 0.2.0

Index Rust source and Markdown docs, then search them with Tantivy
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env sh
set -eu

json_flag=""

if [ "$#" -eq 2 ] && [ "$2" = "--json" ]; then
  json_flag="--json"
fi

if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
  echo "Usage: srcdoc \"<query>\" [--json]" >&2
  echo "Example: srcdoc \"parse markdown headings\" --json" >&2
  exit 2
fi
srcsearch search -i .srcsearch -q "$1" --scope doc $json_flag