summary refs log tree commit diff
path: root/bin/cash/histedit.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-01-11 13:59:39 -0500
committerJune McEnroe <june@causal.agency>2019-01-11 13:59:39 -0500
commit037d883e568435859c61c46f00282ba2d9277d7c (patch)
treed967ca9a31427cc79ff3ca239748f0ae44599a00 /bin/cash/histedit.c
parentDon't make depend automatically (diff)
downloadsrc-037d883e568435859c61c46f00282ba2d9277d7c.tar.gz
src-037d883e568435859c61c46f00282ba2d9277d7c.zip
Add PSlit for prompt escapes
Diffstat (limited to 'bin/cash/histedit.c')
-rw-r--r--bin/cash/histedit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/cash/histedit.c b/bin/cash/histedit.c
index 581925d8..4e8ff8b2 100644
--- a/bin/cash/histedit.c
+++ b/bin/cash/histedit.c
@@ -177,6 +177,14 @@ sethistsize(const char *hs)
 }
 
 void
+setpslit(const char *lit) {
+	if (el != NULL && *lit < 0x20) {
+		el_set(el, EL_PROMPT_ESC, getprompt, *lit);
+		el_set(el, EL_RPROMPT_ESC, getrprompt, *lit);
+	}
+}
+
+void
 setterm(const char *term)
 {
 	if (rootshell && el != NULL && term != NULL)