blob: bab0616210d97afc572907789667c69d371cb226 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/sh
MBLAZE=${MBLAZE:-$HOME/.mblaze}
engine=$(mhdr -h search-engine "$MBLAZE/profile")
while getopts nm- opt; do
case $opt in
n)
engine=notmuch
;;
m)
engine=mu
;;
'?')
printf "Usage: %s: [-n | -m] query\n" $0
exit 1
;;
-)
break
;;
esac
done
shift $(($OPTIND - 1))
[ -z "$engine" ] && engine=notmuch
case $engine in
notmuch)
exec notmuch search --output=files "$@"
;;
mu)
exec mu find --fields l "$@"
;;
*)
echo "Unsupported search engine: $engine"
exit 1
;;
esac
|