dpeacock's answer is probably the best you can get currently.
If you look at this SO question you can see that you could load the history yourself, but loading and running it is another story as I cannot seem to find a way to get access to the ILoop
variable, which is the interactive loop that you could run an interpret
command through.
To load the history, just do
val history = new FileHistory(new File("HOME/.spark_history"))
history.index //gives you the current number
history.moveTo(NUMBER) //moves the cursor
history.current //gives you the command you want
You could wrap this all up in an object, but without the ILoop
you would still need to copy and paste. So....the short answer is not really