Next: , Previous: , Up: Special sequences sent by back-end and handled by DomTerm   [Contents]


16.3.1.2 Command parts (shell integration)

The escape sequences will be deprecated in favor these sequences (not yet finalized).

"\e[12u"

Start of error output. DomTerm places the following text inside a <span> element whose std attribute has the value "error". The default style is to display the text in red.

"\e[11u"

End of error output.

"\e[14u"

Start of prompt. DomTerm places the following text inside a <span> element whose std attribute has the value "prompt". The default style is to display the text in green.

"\e[13u"

End of prompt. The prompt is included in selections that surround it.

"\e[18u"

End of non-selectable prompt. The prompt is not part of the text content of the document, and is not included in selections. The prompt string must be plain text with no styling. You can use this for all prompts, but it is especially recommended for continuation lines, such as the shell’s PS2 prompt.

"\e[15u"
"\e[15;" edit-mode "u"

Start of an input line. This also implicitly ends a (selectable) prompt. The input line is implicitly terminated by a '\n' (carriage return).

The edit-mode specifies what kind of input-line-editing is in effect, which affects how mouse clicks are handled. If edit-mode is 0, it means there is no input-line-editing, and no arrow key support by the client; the value 1 (the default) means single-line editing (like GNU readline); the value 2 means the first line of a multi-line editing group (as JLine3).

"\e[16u"
"\e[17u"

Delimit a hide/show "button", with "\e[16u" before and "\e[17u" after. The text between should be 1 or 2 characters (code points). The first character is displayed when contents are visible (shown) and that when clicked causes contents to be hidden. If there is a second character, it is the character used when contents are hidden and that when clicked causes contents to be shown. If the first character matches a "hide" entry in the predefined showHideMarkers table, then the second character defaults to the corresponding "show" entry.

"\e[83;" mode "u"

Delimit a span to be controlled by a show/hide button (previously printed). If mode is 1 or 2 it starts a span, while mode 0 ends the span. The span is initially visible if mode is 1, and is hidden if mode is 2.

"\e]119;" group-id "\a"
"\e[19u" (deprecated)

Start a command group. This command implicitly does a "fresh line" and ends any existing command group with the same group-id. (The "\e[19u" variant is equivalent to an empty group-id - i.e. "\e]119;\a".) Creates a nested command-group if there is no existing command group with the same group-id.

You can write this string before writing an input prompt string. The content-id is commonly the process-id of the REPL.

"\e]120;" group-id "\a"

(Experimental) Enter a new command-group without closing any current group.

"\e]121;" group-id "\a"

(Experimental) Exit the command-group with the given group-id.

"\e]122;" pattern "\a"

Set continuation prompt template. This is used for non-initial lines in a multi-line input editing area. The template uses print-style % escapes to indicate things to fill out. It is similar to the one used for JLine.

"\e]123;\a"

Extend previous input line for editing. Typically used after reading an input line that is syntactically incomplete, but valid “so far“. The previous input is “re-opened” for editing, and a fresh empty line added.


Next: Window operations, Previous: Miscellaneous sequences, Up: Special sequences sent by back-end and handled by DomTerm   [Contents]