julia>|
DS9> connect
"7f000001:59505"
DS9> set frame new
DS9> set X
Creating custom REPL modes can be done with something like REPLMaker, so the questions would just be
How do we want to interface with the custom mode (i.e. what character to switch over (I used |), what color is the prompt, is there additional information we want to show?)
What commands can be used in this interface (I'm pretty sure we can just use macros and allow use of any commands, but it makes most sense to use this for connect, set, and maybe some others). Another idea I had is that the command line defaults to issuing set commands, that is, running DS9> frame new would just call set("frame new") with some special cases like connect would call the DS9.connect method.
If this sounds interesting, I'd like to slowly incorporate this into a PR. It is mostly just expression parsing, so we could create a macro system like ds9"frame new" which would include all the logic we need for the REPL.
I really like this. You may want to show the current DS9 frame number in the prompt (and perhaps the server address if there are several ones running).
I've had this neat idea of creating a REPL mode for DS9. The idea is that, instead of writing something like this-
you could do this-
Creating custom REPL modes can be done with something like REPLMaker, so the questions would just be
|
), what color is the prompt, is there additional information we want to show?)connect
,set
, and maybe some others). Another idea I had is that the command line defaults to issuingset
commands, that is, runningDS9> frame new
would just callset("frame new")
with some special cases likeconnect
would call theDS9.connect
method.If this sounds interesting, I'd like to slowly incorporate this into a PR. It is mostly just expression parsing, so we could create a macro system like
ds9"frame new"
which would include all the logic we need for the REPL.