w3m と markdown が必要。
-dump とるとインタラクティブ。
function markdown_preview(){
if [ $# -ne 1 ]
then
echo "error: invalid arguments"
echo "usage: $0 markdown_file"
return 1
fi
if [ ! -f "$1" ]
then
echo "error: $1 dose not exists"
return 2
fi
(echo '<html><head><meta charset="UTF-8" /></head><body>';
markdown $1; echo '</body></html>')\
| w3m -T text/html -dump
# screen で縦割りしたときにズレる問題解決
if [ $STY ]
then
sleep 0.2
screen -X redisplay
fi
}