summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-20 20:13:24 -0500
committerJune McEnroe <june@causal.agency>2019-11-20 20:13:24 -0500
commit9415561a615599cb75e1db5e3679f5551f0da947 (patch)
treef45888755aac082f48db3fbd41d495bc4d63e917 /bin
parentRemove color from 1sh prompts (diff)
downloadsrc-9415561a615599cb75e1db5e3679f5551f0da947.tar.gz
src-9415561a615599cb75e1db5e3679f5551f0da947.zip
Remove PSlit
Diffstat (limited to 'bin')
-rw-r--r--bin/1sh/1sh.116
-rw-r--r--bin/1sh/histedit.c24
-rw-r--r--bin/1sh/myhistedit.h1
-rw-r--r--bin/1sh/var.c3
4 files changed, 0 insertions, 44 deletions
diff --git a/bin/1sh/1sh.1 b/bin/1sh/1sh.1
index 42d683a8..65e0bda9 100644
--- a/bin/1sh/1sh.1
+++ b/bin/1sh/1sh.1
@@ -1585,22 +1585,6 @@ is active).
 The default is
 .Dq Li "+ " .
 .
-.It Va PSlit
-Defines the character which may be embedded in pairs, in
-.Va PS1 ,
-.Va PS2 ,
-.Va RPS1
-or
-.Va RPS2
-to indicate to
-.Xr editline 7
-that the characters between each pair of occurrences of the
-.Va PSlit
-character will not appear in the visible prompt, and will not
-cause the terminal's cursor to change position, but rather set terminal
-attributes for the following prompt character(s) at least one of
-which must be present.
-.
 .It Va RPS1
 The primary right prompt string.
 .Va RPS1
diff --git a/bin/1sh/histedit.c b/bin/1sh/histedit.c
index 08339a00..0d23e9aa 100644
--- a/bin/1sh/histedit.c
+++ b/bin/1sh/histedit.c
@@ -224,30 +224,6 @@ sethistsize(const char *hs)
 }
 
 void
-setpslit(const char *lit_ch) {
-	wchar_t wc;
-
-	if (!(iflag && editing && el))
-		return;
-
-	if (lit_ch == NULL) {
-		el_set(el, EL_PROMPT, getprompt);
-		el_set(el, EL_RPROMPT, getrprompt);
-		return;
-	}
-
-	mbtowc(&wc, NULL, 1);		/* state init */
-
-	if (mbtowc(&wc, lit_ch, strlen(lit_ch)) <= 0) {
-		el_set(el, EL_PROMPT, getprompt);
-		el_set(el, EL_RPROMPT, getrprompt);
-	} else {
-		el_set(el, EL_PROMPT_ESC, getprompt, (int)wc);
-		el_set(el, EL_RPROMPT_ESC, getrprompt, (int)wc);
-	}
-}
-
-void
 setterm(const char *term)
 {
 	if (rootshell && el != NULL && term != NULL)
diff --git a/bin/1sh/myhistedit.h b/bin/1sh/myhistedit.h
index 6eebe521..feb4803e 100644
--- a/bin/1sh/myhistedit.h
+++ b/bin/1sh/myhistedit.h
@@ -41,6 +41,5 @@ extern int displayhist;
 void histedit(void);
 void sethistfile(const char *);
 void sethistsize(const char *);
-void setpslit(const char *);
 void setterm(const char *);
 
diff --git a/bin/1sh/var.c b/bin/1sh/var.c
index 83e48732..6cfeefe4 100644
--- a/bin/1sh/var.c
+++ b/bin/1sh/var.c
@@ -87,7 +87,6 @@ struct varinit {
 #ifndef NO_HISTORY
 struct var vhistfile;
 struct var vhistsize;
-struct var vpslit;
 struct var vterm;
 #endif
 struct var venv;
@@ -140,8 +139,6 @@ static const struct varinit varinit[] = {
 	{ &vrps2,	VUNSET,				"RPS2=",
 	  NULL },
 #ifndef NO_HISTORY
-	{ &vpslit,	VUNSET,				"PSlit=",
-	  setpslit },
 	{ &vterm,	VUNSET,				"TERM=",
 	  setterm },
 #endif
l/commit/window.c?id=a281bdc5e1700e25022536a5482b1fb41ece4219&follow=1'>Show indicator in status when window has pending inputJune McEnroe 2022-02-20Use separate edit buffers for each IDJune McEnroe 2022-02-20Make sure new cap is actually larger than new lengthJune McEnroe 2022-02-20Remove unused mbs.len field from struct EditJune McEnroe 2022-02-19Remove unneeded includes in ui.cJune McEnroe 2022-02-19Reimplement tab completeJune McEnroe 2022-02-19Handle errors from editFn, etc.June McEnroe 2022-02-19Reimplement text macrosJune McEnroe 2022-02-19Factor out input handling to input.cJune McEnroe 2022-02-19Factor out window management to window.cJune McEnroe 2022-02-19Enable -Wmissing-prototypesJune McEnroe In other words, warn when a function is missing static. I don't see why this isn't in -Wextra. 2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe 2022-02-19Run line editing testsJune McEnroe I know, it feels wrong. 2022-02-18Implement new line editing "library"June McEnroe Losing tab complete and text macros, for now. This new implementation works on an instance of a struct and does not interact with the rest of catgirl, making it possible to copy into another project. Unlike existing line editing libraries, this one is entirely abstract and can be rendered externally. My goal with this library is to be able to implement vi mode. Since it operates on struct instances rather than globals, it might also be possible to give catgirl separate line editing buffers for each window, which would be a nice UX improvement. 2022-02-18Simplify cursor positioning in inputJune McEnroe Do some extra work by adding the portion before the cursor to the input window twice, but simplify the interaction with the split point. This fixes the awkward behaviour when moving the cursor across colour codes where the code would be partially interpreted up to the cursor. 2022-02-18Fix M-f orderingJune McEnroe 2022-02-12Move sandman build to scripts/MakefileJune McEnroe 2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe 2022-02-12Copy RPP defines from oconfigureJune McEnroe