I want to capture it so I can open it in a pager:
function more(content::AbstractString)
run(pipeline(`echo $(content)`, `less`))
nothing
end
more(@code_llvm sth())
I want to capture it so I can open it in a pager:
function more(content::AbstractString)
run(pipeline(`echo $(content)`, `less`))
nothing
end
more(@code_llvm sth())
This might help:
Use the function instead Interactive Utilities · The Julia Language. In particular, the io
argument.
Also, it’s not a good idea to use echo
. You should just use an IOBuffer
instead.