Change the default command prompts

This commit is contained in:
Justine Tunney 2022-04-06 06:56:11 -07:00
parent ce9bdbb0bf
commit 82f2e758c7
6 changed files with 18 additions and 9 deletions

View file

@ -5731,7 +5731,7 @@ retry:
linenoiseSetFreeHintsCallback(free);
linenoiseSetHintsCallback(ShellHint);
linenoiseSetCompletionCallback(ShellCompletion);
if ((p = linenoiseWithHistory("$ ", "unbourne"))) {
if ((p = linenoiseWithHistory(">: ", "unbourne"))) {
nr = min(strlen(p), IBUFSIZ - 2);
memcpy(buf, p, nr);
buf[nr++] = '\n';

View file

@ -370,8 +370,8 @@ static int handle_luainit (lua_State *L) {
*/
#if !defined(LUA_PROMPT)
#define LUA_PROMPT "> "
#define LUA_PROMPT2 ">> "
#define LUA_PROMPT ">: "
#define LUA_PROMPT2 ">>: "
#endif
#if !defined(LUA_MAXINPUT)

View file

@ -101,7 +101,7 @@ PyRun_InteractiveLoopFlags(FILE *fp, const char *filename_str, PyCompilerFlags *
}
v = _PySys_GetObjectId(&PyId_ps1);
if (v == NULL) {
_PySys_SetObjectId(&PyId_ps1, v = PyUnicode_FromString(">>> "));
_PySys_SetObjectId(&PyId_ps1, v = PyUnicode_FromString(">>: "));
Py_XDECREF(v);
}
v = _PySys_GetObjectId(&PyId_ps2);

View file

@ -510,6 +510,9 @@ int lre_parse_escape(const uint8_t **pp, int allow_utf16)
case 'f':
c = '\f';
break;
case 'e':
c = '\e'; /* [jart] love this */
break;
case 'n':
c = '\n';
break;

View file

@ -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 */

View file

@ -1,3 +1,4 @@
/* clang-format off */
/* DO NOT EDIT!
** This file is automatically generated by the script in the canonical
** SQLite source tree at tool/mkshellc.tcl. That script combines source
@ -34,7 +35,6 @@
/* This needs to come before any includes for MSVC compiler */
#define _CRT_SECURE_NO_WARNINGS
#endif
/* clang-format off */
/*
** Determine if we are dealing with WinRT, which provides only a subset of
@ -20521,8 +20521,8 @@ static void main_init(ShellState *data) {
sqlite3_config(SQLITE_CONFIG_URI, 1);
sqlite3_config(SQLITE_CONFIG_LOG, shellLog, data);
sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
sqlite3_snprintf(sizeof(mainPrompt), mainPrompt,"sqlite> ");
sqlite3_snprintf(sizeof(continuePrompt), continuePrompt," ...> ");
sqlite3_snprintf(sizeof(mainPrompt), mainPrompt,"sqlite>: ");
sqlite3_snprintf(sizeof(continuePrompt), continuePrompt," ...>: ");
}
/*