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


16.3.1.1 Miscellaneous sequences

"\e[3J"

Erase the scrollback buffer (i.e. any lines above the home line). (This is an xterm feature.)

"\e[7J"

Delete all lines in the buffer (including scrolled lines), except the current line.

"\e[>0c"

Request Secondary Device Attributes. (This is a standard request for xt100style terminals, including xterm.) DomTerm responds "\e]990;XXYYYZZ;0c", where the number XXYYYZZ is derived from the DomTerm version number "XXX.YYY.ZZ".

"\e]7;file://" hostname "/"directory "\a"

Specifies the current directory of the process. (This is generated by some shells by default. On Fedora this is done by the script /etc/profile.d/vte.sh.)

"\e]8;" options ";" url "\a" text "\e]8;;\a"

Create a link with the given url and display text (which can contain other escape sequences for styling). The options are ignored. The link has class="subtle plain". See this link.

"\e]30;" name "\a"

Sets the “session name” to name, which is shown in the window title. Specifically sets the name attribute of the top-level domterm <div> node to name. This can be used to enable stylesheet rules to only apply to specfic DomTerm windows. If an active CSS stylesheet contains:

div.domterm[name="name"] { rules }

then the rules are only active for a DomTerm element whose session name is name.

"\e]72;" html-text "\a"

Insert HTML text (a fragment). The html-text can be a complete html file, but elements such as <html>, <body> or <style> are ignored.

The HTML is sanity-checked for safety.

A <base href="base-url"/> element in the html-text is skipped, except that the base-url is used for subsequent relative URLs (for src attributes for <img> elements, and for href attributes for <a> elements) in the same html-text.

The actual policy for allowed elements and attributes can be changed by overwriting the elementInfo and allowAttribute functions in terminal.js. The default policy is a work-in-progress.

"\e]721;" key ";" html-text "\a"

Replace previously-inserted HTML. Looks for the latest element (in document order) whose class includes can-replace-children and that has a replace-key="key" attribute. Essentially sets the innerHTML to html-text (after safety-scrubbing).

"\e]73;" keyName "\a"
"\e]74;" keyName "\a"
"\e]73;" keyName "\t" kstr "\a"
"\e]74;" keyName "\t" kstr "\a"

Simulate pressing keyName. Used by auto-line mode. The 73 variant supresses echo.

"\e[20u"

Starts a "fresh line": If at the beginning of line, does nothing. Otherwise moves to the start of a new line.

"\e[80;97u"
"\e[80;99u"
"\e[80;108u"
"\e[80;112u"

Set input editing mode. The value 99 ('c') sets character mode; the value 108 ('l') sets line-editing mode. The value 97 ('a') set automatic mode, which switches between character mode and line-editing mode based on the mode of the inferior process (when using a PTY). The value 112 ('p' for "pipe") is like line-editing mode, but the inferiors doesn’t echo the input, so we have to do it. This mode is useful when the input is a pipe or some other non-tty stream.

"\e[81u\n"

Requent to send the state of the window as a WINDOW-CONTENTS response.

"\e]88;" object "\a"

Set or update local settings to object, which is a map from keys to values, in JSON object format. Existing local settings not in object are not changed. If a value is null, the corresponding setting is removed from the local settings, so the global settings (or default) will apply.

"\e[89;" settings "\a"

Internal use: Update user settings.

"\e[92;" op "u"

Temporarily enable auto-pause if op is 1. Disables it if op is 2 (- only if temporarily enabled). A simplified more program could temporarily enable auto-pause, print some amount of output, and then revert the state. This used by the domterm help command.

"\e[99;99u"

End-of-file on the output stream. Calls the eofSeen method of DomTerm, which may close the current window or other appropriate action.

"\e]103;" state "\a"

Send saved state to new window.

"\e]231;" jtext "\a"

Paste the contents of the JSON-encoded string jtext.

"\e]97;" command "\a"

Execute the named command. If command starts with a left-brace, it is a JSON object, whose preperties may include cmd (a command-name), id (a number to identify the requester, copied to a RESPONSE, if any), and possibly other properties, depending on the cmd.


Next: Command parts (shell integration), Up: Special sequences sent by back-end and handled by DomTerm   [Contents]