Skip to content

Instantly share code, notes, and snippets.

@derBingle
Created September 8, 2017 17:41
Show Gist options
  • Save derBingle/b6ae60f251b30702d6d1c8778d6ccdb3 to your computer and use it in GitHub Desktop.
Save derBingle/b6ae60f251b30702d6d1c8778d6ccdb3 to your computer and use it in GitHub Desktop.
Convert an OCaml file or the clipboard to Reason, and copy the result to the clipboard.
function recp () {
if [ $# -ge 1 -a -f "$1" ]
then
refmt --parse ml --print re "$@" | pbcopy;
else
pbpaste | refmt --parse ml --print re | pbcopy
fi
}
@derBingle
Copy link
Author

Note: Only works on macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment