aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-23 15:06:32 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-23 15:06:32 +1200
commit8854d67023239a33079715d5e060992c0fb4478a (patch)
treeecd0783b4e3deb7d6c0f5ab179f27eab80789aff /sh/shrc
parentPort Bash prompt updates to pdksh (diff)
downloaddotfiles-8854d67023239a33079715d5e060992c0fb4478a.tar.gz
dotfiles-8854d67023239a33079715d5e060992c0fb4478a.zip
Set POSIX PS1 before loading subscripts
So that it's overridden in the correct order by pdksh
Diffstat (limited to 'sh/shrc')
-rw-r--r--sh/shrc5
1 files changed, 5 insertions, 0 deletions
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