Skip to content

DS9 REPL Mode #3

Description

@mileslucas

I've had this neat idea of creating a REPL mode for DS9. The idea is that, instead of writing something like this-

julia> DS9.connect()
"7f000001:59505"

julia> DS9.set("frame new")
julia> X = randn(512, 512);
julia> DS9.set(X)

you could do this-

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions