1#!/bin/sh
2
3if [ -z "$1" ]; then
4echo "usage:"
5echo "$0 search_term"
6exit 0
7fi
8
9$(query -a '(BEOS:APP_SIG=="application/x-vnd.STertois.BeHappy")' | head -1) &
10sleep 1
11LASTWIN=$(hey BeHappy count Window | grep result | cut -d ' ' -f 7)
12let LASTWIN="$LASTWIN - 1"
13hey BeHappy set Book of Window $LASTWIN to "Man pages" > /dev/null
14hey BeHappy set Topic of Window $LASTWIN to "$1" > /dev/null
15