Hi Larry,
#!/usr/local/bin/dash
repl=/usr/local/bin/repl
repll="/usr/local/bin/repl -group"
case $(folder -fast) in
lists|obsd|nmh) list=1 ;;
*) : ;;
esac
if [ $# -eq 0 ] ; then
scan cur > /dev/null 2>&1
err=$?
case "$err" in
0) cur=$(basename "$(mhpath cur)") ;;
1) echo "no cur" ; exit ;;
*) exit ;;
esac
if [ $list -eq 1 ] ; then
$repll "$cur"
else
$repl "$cur"
fi
else
if [ $list -eq 1 ] ; then
$repll "$@"
else
$repl "$@"
fi
fi
I think I see what that's doing.
Here's a shorter equivalent, hopefully. :-)
#! /usr/local/bin/dash
test $# -eq 0 && set cur
case "$(folder -fast)" in
lists|obsd|nmh) g=-group;;
*) g=;;
esac
exec /usr/local/bin/repl $g "$@"
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers