summaryrefslogtreecommitdiffstats
path: root/linenoise/linenoise.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-08-03 06:50:38 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-08-03 06:50:38 -0700
commitcfd11a27aed69fec13d76135b45859554bf1f627 (patch)
tree8b0e771721d88ca2ed362849399ac89a4a590c1b /linenoise/linenoise.h
parent3f69d61563276436bef7c17296a1eb4fd8b15164 (diff)
downloadtxr-cfd11a27aed69fec13d76135b45859554bf1f627.tar.gz
txr-cfd11a27aed69fec13d76135b45859554bf1f627.tar.bz2
txr-cfd11a27aed69fec13d76135b45859554bf1f627.zip
listener: prompt feature for plain mode.
The :prompt-on command will enable prompting in plain mode. * linenoise/linenoise.c (struct lino_state): New member, show_prompt. (line_enable_noninteractive_prompt): New function. (linenoise): In the plain mode loop, the show_prompt flag is on, show the prompt. For continuation lines, show a condensed prompt, which consists of the suffix of the full prompt, starting on the last non-whitespace character. * linenoise/linenoise.h (lino_enable_noninteractive): Declared. * parser.c (repl): Implement :prompt-on command which enables the above mode. * txr.1: Documented.
Diffstat (limited to 'linenoise/linenoise.h')
-rw-r--r--linenoise/linenoise.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/linenoise/linenoise.h b/linenoise/linenoise.h
index 151ee99c..7fef68d9 100644
--- a/linenoise/linenoise.h
+++ b/linenoise/linenoise.h
@@ -124,6 +124,7 @@ void lino_set_selinclusive(lino_t *, int si);
int lino_get_selinculsive(lino_t *);
void lino_set_noninteractive(lino_t *, int ni);
int lino_get_noninteractive(lino_t *);
+void lino_enable_noninteractive_prompt(lino_t *, int enable);
typedef wchar_t *lino_atom_cb_t(lino_t *, const wchar_t *line, int n, void *ctx);
void lino_set_atom_cb(lino_t *, lino_atom_cb_t *, void *ctx);