You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Develop a Cli application managing a command history
In order to use Text input to develop a CLI like application we need to call a text() inside a loop where the workflow is:
submit command
exec command
wait for another command
repeat until user cancel input
Problem 1 : Manage Up / Down
Using the standard text function I can't set cursor event handler to manage Up/Down key. It would be great to have another function (eg const textPrompt = (opts: TextOptions): TextPrompt) that return the underlyend customised TextPrompt
Problem 2: Rewrite prompt buffer
Currently the rl:ReadLiner property Prompt is private and I can't rewrite prompt value with command history. I would be great have a method allowing such rewrite
The text was updated successfully, but these errors were encountered:
Develop a Cli application managing a command history
In order to use Text input to develop a CLI like application we need to call a
text()
inside a loop where the workflow is:Problem 1 : Manage Up / Down
Using the standard
text
function I can't setcursor
event handler to manage Up/Down key. It would be great to have another function (egconst textPrompt = (opts: TextOptions): TextPrompt
) that return the underlyend customisedTextPrompt
Problem 2: Rewrite prompt buffer
Currently the
rl:ReadLiner
propertyPrompt
is private and I can't rewrite prompt value with command history. I would be great have a method allowing such rewriteThe text was updated successfully, but these errors were encountered: