diff options
author | René Neumann <rene.neumann@in.tum.de> | 2011-08-12 14:04:14 +0200 |
---|---|---|
committer | René Neumann <rene.neumann@in.tum.de> | 2011-08-12 14:04:14 +0200 |
commit | 48439f8844f6d54fbb958f074f985c130be7989c (patch) | |
tree | 3615efe49b4b40db43f04fc556807f2c5afb9316 /.zsh/functions/IE | |
parent | 4e13f6b3836aa7efa59242e2823503b3dbd2085b (diff) | |
download | dotfiles-48439f8844f6d54fbb958f074f985c130be7989c.tar.gz dotfiles-48439f8844f6d54fbb958f074f985c130be7989c.tar.bz2 dotfiles-48439f8844f6d54fbb958f074f985c130be7989c.zip |
Enhance IE script
Diffstat (limited to '')
-rw-r--r-- | .zsh/functions/IE | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/.zsh/functions/IE b/.zsh/functions/IE index 1c40f45..d7832fd 100644 --- a/.zsh/functions/IE +++ b/.zsh/functions/IE @@ -1,5 +1,6 @@ # default arguments to isabelle emacs -local defargs="-x true -m iff" +readonly defargs="-x true -m iff" +readonly default="HOL" local file logic # safety check to avoid failing later on @@ -24,8 +25,8 @@ esac # have a .isabelle-logic file that contains a logic-image pattern # if it contains "..", the parent directory is searched if [[ -z $logic && -e .isabelle-logic ]]; then - local line p=.isabelle-logic - line=$(head -1 $p) + local p=.isabelle-logic + local line=$(head -1 $p) while [[ $line == .. ]]; do p=../$p @@ -62,13 +63,13 @@ if [[ -n $logic && $logic != "HOL" ]]; then fi fi -# fall-through if not logic could be determined +# fall-through if no logic could be determined if [[ -z $logic ]]; then - logic="HOL" + logic=$default echo "Defaulting to '$logic'." fi # AAAAND ... FIRE! -isabelle emacs ${=defargs} -l $logic $file "$@" +isabelle emacs ${=defargs} "$@" -l $logic $file # vim: ft=zsh |