This is a gnuplot scripting question on unix like systems.
For shell executable gnuplot scripts starting like:-
#!/opt/local/bin/gnuplot
how do you switch to the gnuplot prompt in the starting terminal session, at the end of the script?
Adding
load "/dev/stdin"
at the end, switches the input, but gives no user prompt.
I would like to let the user replot their own data over the setup and background generated by the script, and/or enter other gnuplot commands. I am looking for an elegant solution within gnuplot. When using the #!/opt/local/bin/gnuplot -c in a gnuplot scriptfile (after a chmod +x), I would like ./script.gp to work the same way as call "script.gp" from gnuplot does. This is so we could subsequently replot "info.dat" at a gnuplot prompt in each case. I want to switch gnuplot from batch mode to interactive at the end of the script (probably like in the way a startup file would). I can't remember or find the command/trick for this (load "/dev/stdin" is close).
The plot window in this case is AquaTerm, gnuplot 5.0 patchlevel 3 (macports), and the terminal session is OS X "Terminal". --persist seems unhelpful in changing the experience.

expecttag to your question as I suspect there is an elegant solution using it.