Interface: REPL

January 18, 2022 · View on GitHub

Kui API Documentation - v11.0.0 / @kui-shell/core / REPL

Interface: REPL

@kui-shell/core.REPL

Table of contents

Methods

Methods

click

click(command, evt): Promise<void>

Execute a command in response to an in-view click in a sidecar view. This is helpful if you wish to participate in the view nesting logic, e.g. where clicking on a link in a sidecar allows the user to return to the previous view. In contrast, pexec calls will not participate in view stacking.

Parameters

NameType
commandstring | () => Promise<string>
evtMouseEvent

Returns

Promise<void>

Defined in

packages/core/src/models/repl.ts:58


encodeComponent

encodeComponent(component, quote?): string

Prepare a string to be part of a command argument to the *exec functions, quoting and escaping as necessary.

Parameters

NameType
componentstring | number | boolean
quote?string

Returns

string

Defined in

packages/core/src/models/repl.ts:71


pexec

pexec<T>(command, execOptions?): Promise<T>

Programmatic eval. Useful to execute one command from another, e.g. as the result of a click handler --- where you would like the REPL interaction to appear on the console.

Type parameters

NameType
Textends KResponse<any>

Parameters

NameType
commandstring
execOptions?ExecOptions

Returns

Promise<T>

Defined in

packages/core/src/models/repl.ts:48


qexec

qexec<T>(command, block?, contextChangeOK?, execOptions?, nextBlock?): Promise<T>

Quiet eval. Useful to execute one command from another, without emitting output to the console.

Type parameters

NameType
Textends KResponse<any>

Parameters

NameType
commandstring
block?boolean | HTMLElement
contextChangeOK?boolean
execOptions?ExecOptions
nextBlock?HTMLElement

Returns

Promise<T>

Defined in

packages/core/src/models/repl.ts:27


reexec

reexec<T>(command, execOptions): Promise<T>

Evaluate a command and place the result in the current active view for the given tab

Type parameters

NameType
Textends KResponse<any>

Parameters

NameType
commandstring
execOptionsExecOptionsWithUUID

Returns

Promise<T>

Defined in

packages/core/src/models/repl.ts:64


rexec

rexec<Raw>(command, execOptions?): Promise<RawResponse<Raw>>

Raw eval. Useful to execute one command from another, where you want the original model back, not the view-oriented model.

Type parameters

NameType
Rawextends unknown

Parameters

NameType
commandstring
execOptions?ExecOptions

Returns

Promise<RawResponse<Raw>>

Defined in

packages/core/src/models/repl.ts:40


split

split(str, removeOuterQuotes?, removeInlineOuterQuotes?): string[]

Split the given string into an argv

Parameters

NameType
strstring
removeOuterQuotes?boolean
removeInlineOuterQuotes?boolean

Returns

string[]

Defined in

packages/core/src/models/repl.ts:80