mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 00:10:31 +00:00
Change the default command prompts
This commit is contained in:
parent
ce9bdbb0bf
commit
82f2e758c7
6 changed files with 18 additions and 9 deletions
10
third_party/quickjs/repl.js
vendored
10
third_party/quickjs/repl.js
vendored
|
@ -111,9 +111,9 @@ import * as os from "os";
|
|||
var plen = 0;
|
||||
var ps1;
|
||||
if (config_numcalc)
|
||||
ps1 = "> ";
|
||||
ps1 = ">: ";
|
||||
else
|
||||
ps1 = "qjs > ";
|
||||
ps1 = "qjs >: ";
|
||||
var ps2 = " ... ";
|
||||
var utf8 = true;
|
||||
var show_time = false;
|
||||
|
@ -547,6 +547,11 @@ import * as os from "os";
|
|||
this_fun = kill_region;
|
||||
}
|
||||
|
||||
function clear_screen() {
|
||||
std.puts("\e[H\e[2J");
|
||||
return -1;
|
||||
}
|
||||
|
||||
function kill_line() {
|
||||
kill_region(cursor_pos, cmd.length, 1);
|
||||
}
|
||||
|
@ -743,6 +748,7 @@ import * as os from "os";
|
|||
"\x09": completion, /* ^I - history-search-backward */
|
||||
"\x0a": accept_line, /* ^J - newline */
|
||||
"\x0b": kill_line, /* ^K - delete to end of line */
|
||||
"\x0c": clear_screen, /* ^L - clear screen */
|
||||
"\x0d": accept_line, /* ^M - enter */
|
||||
"\x0e": next_history, /* ^N - down */
|
||||
"\x10": previous_history, /* ^P - up */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue