Kui API Documentation - v11.0.0 / @kui-shell/core / REPL
@kui-shell/core.REPL
▸ 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.
Name | Type |
---|---|
command |
string | () => Promise <string > |
evt |
MouseEvent |
Promise
<void
>
packages/core/src/models/repl.ts:58
▸ encodeComponent(component
, quote?
): string
Prepare a string to be part of a command
argument to the *exec
functions, quoting and escaping as necessary.
Name | Type |
---|---|
component |
string | number | boolean |
quote? |
string |
string
packages/core/src/models/repl.ts:71
▸ 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.
Name | Type |
---|---|
T |
extends KResponse <any > |
Name | Type |
---|---|
command |
string |
execOptions? |
ExecOptions |
Promise
<T
>
packages/core/src/models/repl.ts:48
▸ qexec<T
>(command
, block?
, contextChangeOK?
, execOptions?
, nextBlock?
): Promise
<T
>
Quiet eval. Useful to execute one command from another, without emitting output to the console.
Name | Type |
---|---|
T |
extends KResponse <any > |
Name | Type |
---|---|
command |
string |
block? |
boolean | HTMLElement |
contextChangeOK? |
boolean |
execOptions? |
ExecOptions |
nextBlock? |
HTMLElement |
Promise
<T
>
packages/core/src/models/repl.ts:27
▸ reexec<T
>(command
, execOptions
): Promise
<T
>
Evaluate a command and place the result in the current active view for the given tab
Name | Type |
---|---|
T |
extends KResponse <any > |
Name | Type |
---|---|
command |
string |
execOptions |
ExecOptionsWithUUID |
Promise
<T
>
packages/core/src/models/repl.ts:64
▸ 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.
Name | Type |
---|---|
Raw |
extends unknown |
Name | Type |
---|---|
command |
string |
execOptions? |
ExecOptions |
Promise
<RawResponse
<Raw
>>
packages/core/src/models/repl.ts:40
▸ split(str
, removeOuterQuotes?
, removeInlineOuterQuotes?
): string
[]
Split the given string into an argv
Name | Type |
---|---|
str |
string |
removeOuterQuotes? |
boolean |
removeInlineOuterQuotes? |
boolean |
string
[]