aboutsummaryrefslogtreecommitdiff
path: root/pdksh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-09 22:50:43 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-09 22:50:43 +1200
commit5fb559c9eaecd8e5f474f5e3306e73a769a33643 (patch)
treeab4042c9430df48ebe80a9122afe76e7b7aa827c /pdksh
parentTolerate missing tic(1) at least for now (diff)
downloaddotfiles-5fb559c9eaecd8e5f474f5e3306e73a769a33643.tar.gz
dotfiles-5fb559c9eaecd8e5f474f5e3306e73a769a33643.zip
Limit prompt setup to OpenBSD pdksh
FreeBSD's one doesn't seem to support \u \w etc at all
Diffstat (limited to 'pdksh')
-rw-r--r--pdksh/kshrc3
-rw-r--r--pdksh/kshrc.d/prompt.ksh3
2 files changed, 3 insertions, 3 deletions
diff --git a/pdksh/kshrc b/pdksh/kshrc
index 56d6f798..c0697774 100644
--- a/pdksh/kshrc
+++ b/pdksh/kshrc
@@ -6,9 +6,6 @@ set -o emacs
HISTFILE=$HOME/.sh_history
HISTSIZE=$((1 << 12))
-# Prompt
-PS1='\u@\h:\w\$ '
-
# Load any supplementary scripts
for kshrc in "$HOME"/.kshrc.d/*.ksh ; do
[[ -e $kshrc ]] || continue
diff --git a/pdksh/kshrc.d/prompt.ksh b/pdksh/kshrc.d/prompt.ksh
index 561242ad..d261b90d 100644
--- a/pdksh/kshrc.d/prompt.ksh
+++ b/pdksh/kshrc.d/prompt.ksh
@@ -1,3 +1,6 @@
+# All of this is only known to work on OpenBSD's fork of pdksh
+[[ $(uname -s) == OpenBSD ]] || return
+
# Frontend to controlling prompt
prompt() {