From e9af3c7681723244c0ca305d8cc540ad4540ca80 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 11 Jan 2019 13:59:39 -0500 Subject: Add PSlit for prompt escapes --- bin/cash/histedit.c | 8 ++++++++ bin/cash/myhistedit.h | 1 + bin/cash/var.c | 3 +++ 3 files changed, 12 insertions(+) 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 @@ -176,6 +176,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) { diff --git a/bin/cash/myhistedit.h b/bin/cash/myhistedit.h index ba39eb0e..8f1305ad 100644 --- a/bin/cash/myhistedit.h +++ b/bin/cash/myhistedit.h @@ -40,5 +40,6 @@ extern int displayhist; void histedit(void); void sethistsize(const char *); +void setpslit(const char *); void setterm(const char *); diff --git a/bin/cash/var.c b/bin/cash/var.c index 54663914..e183eaa3 100644 --- a/bin/cash/var.c +++ b/bin/cash/var.c @@ -86,6 +86,7 @@ struct varinit { #ifndef NO_HISTORY struct var vhistsize; +struct var vpslit; struct var vterm; #endif struct var venv; @@ -130,6 +131,8 @@ static const struct varinit varinit[] = { { &vrps2, VUNSET, "RPS2=", NULL }, #ifndef NO_HISTORY + { &vpslit, VUNSET, "PSlit=", + setpslit }, { &vterm, VUNSET, "TERM=", setterm }, #endif -- cgit 1.4.1 al.c'>
path: root/local.c (unfollow)
Commit message (Expand)Author
2021-08-20Replace verbose colors with two types of arrowsJune McEnroe
2021-08-20Explicitly clear TLS secrets after handshakeJune McEnroe
2021-08-20Handle TLS_WANT_POLL{IN,OUT} from tls_handshake(3) with serverJune McEnroe
2021-08-20Use "secure" libtls ciphersJune McEnroe
2021-07-08Use seprintf to build final 005June McEnroe
2021-06-19Fix LDADD.crypt on DarwinJune McEnroe
2021-06-18Add -m mode option to set user modesJune McEnroe
2021-06-18Document channel keys in join optionJune McEnroe
2021-06-18Use | to separate flags from config optionsJune McEnroe
2021-06-18Stop referring to server-time as IRCv3.2June McEnroe
2021-06-17Add mailing list archive to READMEJune McEnroe
2021-06-10Stop accumulating ISUPPORT tokens once MOTD startsJune McEnroe
2021-06-09Use seprintf for snip, removing strlcpynJune McEnroe
2021-06-09Use seprintf for reserializeJune McEnroe
2021-06-09Use seprintf for capListJune McEnroe
2021-06-09Add seprintfJune McEnroe
2021-05-27Add pounce-notify to README 2.4June McEnroe
2021-05-27Fix ENVIRONMENT formatting in pounce-notify(1)June McEnroe
2021-05-27Add note about Libera.Chat SASL-only rangesJune McEnroe
2021-05-25Add QUIRKS fileJune McEnroe
2021-05-19Replace freenode with tilde.chatJune McEnroe
2021-05-04notify: Reword pounce-notify manualJune McEnroe
2021-05-02Clean up Makefiles, configure scriptsJune McEnroe
2021-04-30palaver: Exit on getopt failureJune McEnroe
2021-04-30notify: Implement pounce-notifyJune McEnroe