Skip to content

Instantly share code, notes, and snippets.

View perrutquist's full-sized avatar

Per Rutquist perrutquist

View GitHub Profile
using REPL
using REPL.LineEdit
# basically the same as Base's `display_error`, just with different frames removed
function display_error(io, err, st)
ind = findfirst(frame -> frame.file == Symbol(@__FILE__) && frame.func == :repleval, st)
st = st[1:(ind == nothing ? end : ind - 2)]
printstyled(io, "ERROR: "; bold=true, color=Base.error_color())
showerror(IOContext(io, :limit => true), err, st)
println(io)
end
@tpapp
tpapp / make-REQUIRE.jl
Created September 24, 2018 12:51
make-REQUIRE.jl
#!/usr/bin/env julia
######################################################################
# Overwrite REQUIRE using dependency information from Project.toml.
#
# Call from the root of the package repository.
#
# Has some basic sanity checks, but **use at your own risk**, `REQUIRE`
# will be overwritten.
#
# The purpose of this script is to appease attobot, until