Skip to content

Commit f985ad9

Browse files
committed
Ctrl-C clears the text on the prompt - standard repl behavior
1 parent 09a5ee1 commit f985ad9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ export class ForgeSqlCli {
6363
} else {
6464
console.log("\n" + chalk.gray("(Use .exit, exit, or Ctrl+D to quit)"));
6565
}
66+
67+
// Clear the current line buffer so the prompt is fresh
68+
(this.rl as any).line = "";
69+
(this.rl as any).cursor = 0;
6670
this.rl.prompt();
6771
});
6872
}

0 commit comments

Comments
 (0)