Open
Description
openedon May 24, 2019
A feature request of a restart()
function which restarts Julia and keeps the current working directory, the activate
d path and the window. This feature would be independent of a future comeback of the workspace
function (#25046).
An almost-implementation by @fredrikekre:
function restart()
startup = """
Base.ACTIVE_PROJECT[]=$(repr(Base.ACTIVE_PROJECT[]))
Base.HOME_PROJECT[]=$(repr(Base.HOME_PROJECT[]))
cd($(repr(pwd())))
"""
cmd = `$(Base.julia_cmd()) -ie $startup`
atexit(()->run(cmd))
exit(0)
end
This version is nested, so it keeps old display windows open etc. The actual solution would call exec
with the right arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment