From 531dc149df8c1ba62ee7875f819a94d789935385 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sat, 4 Sep 2021 16:08:26 +0200 Subject: add isabat script This just calls the isabelle2nix util and pipes its output directly into bat, resulting in a somewhat usable cli tool for .thy files. --- isabat | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 isabat (limited to 'isabat') diff --git a/isabat b/isabat new file mode 100755 index 0000000..12efd1d --- /dev/null +++ b/isabat @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [ $# -eq 0 ] +then + echo "isabat: pretty-print isabelle theories on a terminal using bat." + echo "" + echo "please provide a .thy file to display." + exit +fi + +cat "$1" | isabelle2unicode | bat --file-name "$1" --theme TwoDark -- cgit v1.2.3