diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 15:06:32 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-23 15:06:32 +1200 |
commit | 8854d67023239a33079715d5e060992c0fb4478a (patch) | |
tree | ecd0783b4e3deb7d6c0f5ab179f27eab80789aff /sh | |
parent | Port Bash prompt updates to pdksh (diff) | |
download | dotfiles-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')
-rw-r--r-- | sh/shrc | 5 | ||||
-rw-r--r-- | sh/shrc.d/prompt.sh | 3 |
2 files changed, 5 insertions, 3 deletions
@@ -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)") |