API

Replay.replayFunction
replay(instructions::Vector{<:AbstractString}, buf::IO; kwargs...)

Replay the REPL output from given instructions.

Keyword Arguments

Replay options

  • use_ghostwriter: Flag to enable ghostwriter mode. (default: true)

Julia options

  • julia_project: Path to a project where julia process runs. (default: @.)
  • cmd: Additional command for julia process. (default: "--color=yes")
source
Replay.@deparseMacro
@deparse expr

Create a string from expr. It tries to output something similar to we type in Julia REPL. If expr contains @comment <message>, it is transformed into # <message>.

Examples

julia> @deparse 1+1
"1 + 1"

julia> @deparse sin(1f0+a)
"sin(1.0f0 + a)"

julia> @deparse f(x) = sin(x)/x  # Sometimes not work as expected
"f(x) = begin\n        sin(x) / x\n    end\n"
source