Skip to content

Commit 1827b46

Browse files
save file
1 parent 170e7b0 commit 1827b46

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

utils/misc/nodejs-terminal/html/webcontainer-terminal/webcontainer-terminal.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@
107107

108108
}//xy
109109

110+
term.prompt = prompt;
111+
110112
term.end_of_text = function(y){
111113
// xterm.js uses 0-based indexing for the buffer,
112114
// but 1-based for ANSI
@@ -348,6 +350,16 @@
348350
}//focus
349351

350352

353+
obj.prompt = promtpt;
354+
355+
async function prompt(){
356+
console.log('prompt');
357+
//await input.write('\u0003'); // Sends Ctrl+C to clear any junk
358+
await input.write('\n'); // Sends Enter to get a clean prompt
359+
360+
}//prompt
361+
362+
351363
//:
352364

353365

0 commit comments

Comments
 (0)