summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/catsh/catsh.14
-rw-r--r--bin/catsh/var.c14
2 files changed, 3 insertions, 15 deletions
diff --git a/bin/catsh/catsh.1 b/bin/catsh/catsh.1
index 60c93bf9..59f22a3e 100644
--- a/bin/catsh/catsh.1
+++ b/bin/catsh/catsh.1
@@ -1548,9 +1548,7 @@ may include any of the formatting sequences from
 .
 .It Va PS1
 The primary prompt string, which defaults to
-.Dq Li "$ " ,
-unless you are the superuser, in which case it defaults to
-.Dq Li "# " .
+.Dq Li "\e$ " .
 .Va PS1
 may include any of the following formatting sequences,
 which are replaced by the given information:
diff --git a/bin/catsh/var.c b/bin/catsh/var.c
index f11ff8b7..435d3307 100644
--- a/bin/catsh/var.c
+++ b/bin/catsh/var.c
@@ -129,9 +129,8 @@ static const struct varinit varinit[] = {
 	  changepath },
 	{ &vps0,	VUNSET,				"PS0=",
 	  NULL },
-	/*
-	 * vps1 depends on uid
-	 */
+	{ &vps1,	0,				"PS1=\\$ ",
+	  NULL },
 	{ &vps2,	0,				"PS2=> ",
 	  NULL },
 	{ &vps4,	0,				"PS4=+ ",
@@ -194,15 +193,6 @@ initvar(void)
 		vp->flags = ip->flags | VSTRFIXED | VTEXTFIXED;
 		vp->func = ip->func;
 	}
-	/*
-	 * PS1 depends on uid
-	 */
-	if (find_var("PS1", &vpp, &vps1.name_len) == NULL) {
-		vps1.next = *vpp;
-		*vpp = &vps1;
-		vps1.text = __DECONST(char *, geteuid() ? "PS1=$ " : "PS1=# ");
-		vps1.flags = VSTRFIXED|VTEXTFIXED;
-	}
 	fmtstr(ppid, sizeof(ppid), "%d", (int)getppid());
 	setvarsafe("PPID", ppid, 0);
 	for (envp = environ ; *envp ; envp++) {
class='logheader'>2021-02-07Set colours for Xt and cwmJune McEnroe And increase XTerm internalBorder. 2021-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe Weirdly the Fn key doesn't change how the F row registers... I wonder if I can do something about that. 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 11 is what I use on macOS, but I feel like my eyes are working harder here. 2021-02-07Fully configure and rebind cwmJune McEnroe This is sort of a mix of trying to emulate macOS somewhat for my muscle memory and just rebinding some of the cwm defaults to use 4- rather than M-. 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe cwm still needs a lot more rebinding, and I need to actually look at its other options. xterm definitely still needs some configuration, but I at least managed to get it to use a decent looking font. Very happy that OpenBSD includes Luxi Mono, which is what my usual font, Go Mono, is based on anyway. Still missing is xmodmap and such. 2021-02-06Add xterm output to schemeJune McEnroe