improves block functionality
adds cli compatible prompts/logs adds logfile function for debug adds multiselect support new fieldRename adds listFieldNames
This commit is contained in:
29
cli/cursor.ts
Normal file
29
cli/cursor.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
export class Cursor {
|
||||
private static visible = true;
|
||||
|
||||
static show() {
|
||||
this.visible = true;
|
||||
Deno.stdout.writeSync(new TextEncoder().encode("\x1b[?25h"));
|
||||
}
|
||||
|
||||
static hide() {
|
||||
this.visible = false;
|
||||
Deno.stdout.writeSync(new TextEncoder().encode("\x1b[?25l"));
|
||||
}
|
||||
|
||||
static restoreVisibility() {
|
||||
if (this.visible) {
|
||||
this.show();
|
||||
} else {
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
|
||||
static savePosition() {
|
||||
Deno.stdout.writeSync(new TextEncoder().encode("\x1b7"));
|
||||
}
|
||||
|
||||
static restorePosition() {
|
||||
Deno.stdout.writeSync(new TextEncoder().encode("\x1b8"));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user