From 8854d67023239a33079715d5e060992c0fb4478a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 23 Aug 2016 15:06:32 +1200 Subject: Set POSIX PS1 before loading subscripts So that it's overridden in the correct order by pdksh --- sh/shrc | 5 +++++ sh/shrc.d/prompt.sh | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 sh/shrc.d/prompt.sh diff --git a/sh/shrc b/sh/shrc index deb55cc2..9e201ef1 100644 --- a/sh/shrc +++ b/sh/shrc @@ -4,6 +4,11 @@ case $- in *) return ;; esac +# Basic PS1 for POSIX shell; if we're using something more advanced, something +# in ~/.shrc.d should overrule this. Does every POSIX shell support these? dash +# does, at least. +PS1=$(printf '%s@%s$ ' "$(whoami)" "$(hostname -s)") + # Load all the POSIX-compatible functions from ~/.shrc.d; more advanced shells # like bash will have their own functions for sh in "$HOME"/.shrc.d/*.sh ; do diff --git a/sh/shrc.d/prompt.sh b/sh/shrc.d/prompt.sh deleted file mode 100644 index dff42f05..00000000 --- a/sh/shrc.d/prompt.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Basic PS1 for POSIX shell -# Does every POSIX shell support these? dash does, at least. -PS1=$(printf '%s@%s$ ' "$(whoami)" "$(hostname -s)") -- cgit v1.2.3