summaryrefslogtreecommitdiff
path: root/.zsh
diff options
context:
space:
mode:
authorRené Neumann <rene.neumann@in.tum.de>2012-10-27 12:07:26 +0200
committerRené Neumann <rene.neumann@in.tum.de>2012-10-27 12:07:27 +0200
commit70ee9ce5beb9a1a73814596003382c1ecf159d1a (patch)
treea2109711f815e71d74a503334bb91c51208aa180 /.zsh
parenta1ac0d2e1da3bf2bc42f5482de4338cc3795f913 (diff)
downloaddotfiles-70ee9ce5beb9a1a73814596003382c1ecf159d1a.tar.gz
dotfiles-70ee9ce5beb9a1a73814596003382c1ecf159d1a.tar.bz2
dotfiles-70ee9ce5beb9a1a73814596003382c1ecf159d1a.zip
Launch isabelle in background (+ some comments and small cleanup)
Diffstat (limited to '.zsh')
-rw-r--r--.zsh/functions/IE27
1 files changed, 22 insertions, 5 deletions
diff --git a/.zsh/functions/IE b/.zsh/functions/IE
index c65c93b..989cdec 100644
--- a/.zsh/functions/IE
+++ b/.zsh/functions/IE
@@ -1,3 +1,19 @@
+# This function is a wrapper around 'isabelle {emacs,jedit}'
+# Usage: IE [logic-pattern] [file] [options]
+# IJ ...
+#
+# IE launches emacs, IJ jedit
+#
+# - logic-pattern: this is expanded to *logic-pattern* and matched
+# against all logics as returned by `isabelle findlogics`
+# the first match wins
+# - file: file to open
+# - options: options passed verbatim to 'isabelle emacs'
+#
+# If no logic-pattern is given, the file .isabelle-logic is
+# evaluated: This file should contain one line, being either the logic to load,
+# or '..', which makes the script take the .isabelle-logic in the parent directory.
+
readonly default="HOL"
local file logic program defargs
@@ -22,9 +38,10 @@ case x$1 in
x-*);; # argument to isabelle emacs -> ignore
x) ;; # empty -> ignore
x*) # a logic pattern :)
- logic=$1; shift
- if [[ -n $1 && $1 != -* ]]; then
- file=$1; shift
+ logic=$1
+ if [[ -n $2 && $2 != -* ]]; then
+ file=$2
+ shift 2
fi
esac
@@ -75,7 +92,7 @@ if [[ -z $logic ]]; then
echo "Defaulting to '$logic'."
fi
-# AAAAND ... FIRE!
-isabelle ${program} ${=defargs} "$@" -l $logic $file
+# AAAAND ... FIRE! (in the background)
+isabelle ${program} ${=defargs} "$@" -l $logic $file &!
# vim: ft=zsh