@@ -1,7 +1,14 @@
|
||||
async function run(ctx, argv) {
|
||||
globalThis.console.clear?.()
|
||||
const w = globalThis.process?.stdout?.write
|
||||
if (typeof w === 'function') {
|
||||
w.call(globalThis.process.stdout, '\x1b[2J\x1b[3J\x1b[H')
|
||||
const seq = '\x1b[H\x1b[2J\x1b[3J'
|
||||
if (typeof ctx.writeScreen === 'function') {
|
||||
ctx.writeScreen(seq)
|
||||
return
|
||||
}
|
||||
globalThis.console.clear?.()
|
||||
const ps = globalThis.process?.stdout
|
||||
if (ps && typeof ps.write === 'function') {
|
||||
ps.write(seq)
|
||||
return
|
||||
}
|
||||
for (let i = 0; i < 48; i++) ctx.console.log('')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user