Created
April 8, 2018 19:42
-
-
Save baronfel/adf6152842c2100d33637d83c15a90f9 to your computer and use it in GitHub Desktop.
modified fsharpi that handles piped inputs nicer (Thanks John Wostenberg!)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
EXEC="exec " | |
FSHARPI_OPTIONS="" | |
if test x"$1" = x--debug; then | |
DEBUG=--debug | |
shift | |
fi | |
if test x"$1" = x--gdb; then | |
shift | |
EXEC="gdb --eval-command=run --args " | |
fi | |
if test x"$1" = x--valgrind; then | |
shift | |
EXEC="valgrind $VALGRIND_OPTIONS" | |
fi | |
if ! [ -t 0 ]; then | |
FSHARPI_OPTIONS="--readline-" | |
fi | |
# Beware this line must match the regular expression " (\/.*)\/fsi\.exe" when fsi.exe is fsi.exe. | |
# That's because the FSharp MonoDevelop addin looks inside the text of this script to determine the installation | |
# location of the default FSharp install in order to find the FSharp compiler binaries (see | |
# fsharpbinding/MonoDevelop.FSharpBinding/Services/CompilerLocationUtils.fs). That's a pretty unfortunate | |
# way of finding those binaries. And really should be changed. | |
$EXEC /Library/Frameworks/Mono.framework/Versions/5.10.0/bin/mono $DEBUG $MONO_OPTIONS /Library/Frameworks/Mono.framework/Versions/5.10.0/lib/mono/fsharp/fsi.exe $FSHARPI_OPTIONS --exename:"$(basename "$0")" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note that you may need to update your path to mono