On Fri, Nov 5, 2021 at 12:07 PM Konstantin Ryabitsev <konstantin@xxxxxxxxxxxxxxxxxxx> wrote: > > Hello, all: > > I am going to post a series of articles about public inbox's new lei tool > (stands for "local email interface", but is clearly a "lorelei" joke :)). In > addition to being available here on the workflows list, they will also be > posted on my people.kernel.org blog. I also wanted to do non-persistent searches. Essentially, the lore web interface search box on the command line. lei can do this with the right options and some avoidance of shell escaping. The shell script below is what I came up with. Note I have the stable exclusion added because subject searches with 'get the whole thread' enabled often picks up Greg's 100+ patch series. Rob 8<------------------------------------------------------------------ #!/bin/sh # SPDX-License-Identifier: GPL-2.0-only usage() { echo "syntax: `basename $0` [-t] <query string>" echo "" echo "For query syntax, see https://lore.kernel.org/all/_/text/help/" exit 1 } while getopts "ht" opt do case "$opt" in t) threads="-t";; [h?]) usage;; esac done shift $((OPTIND-1)) query_str="$*" [ -z "$query_str" ] && usage tmp_mbox=$(mktemp) echo "$query_str" NOT tc:stable@xxxxxxxxxxxxxxx | \ lei q --no-save --dedupe=mid -f mboxrd -O https://lore.kernel.org/all/ -o $tmp_mbox --stdin if [ -s "$tmp_mbox" ]; then mutt -f $tmp_mbox fi rm $tmp_mbox