summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-05-29 22:20:51 -0400
committerJune McEnroe <june@causal.agency>2022-05-29 22:20:51 -0400
commit4f7d69d6309def1bc7b188ad5e8e41e7d5a18fcc (patch)
tree8bb4fcb6693aa8ec0bdc1a77edd67f3b75aa6cf6
parentAdd mins script (diff)
downloadsrc-4f7d69d6309def1bc7b188ad5e8e41e7d5a18fcc.tar.gz
src-4f7d69d6309def1bc7b188ad5e8e41e7d5a18fcc.zip
Set prompt for oksh
I am trying out actually using oksh full time. Surviving with no
right prompt.
-rw-r--r--home/.shrc16
1 files changed, 3 insertions, 13 deletions
diff --git a/home/.shrc b/home/.shrc
index 1d7542a3..afa87fe5 100644
--- a/home/.shrc
+++ b/home/.shrc
@@ -25,7 +25,7 @@ man() {
 	for sect in $MANSECT; do
 		command man -w $sect "$1" >/dev/null 2>&1 && exec man $sect "$1"
 	done
-	exec man "$1")
+	exec command man "$1")
 }
 
 cd() {
@@ -50,15 +50,5 @@ fi
 export LESS_TERMCAP_us=$(tput sitm)
 export LESS_TERMCAP_ue=$(tput ritm)
 
-hostname=$(hostname -s)
-rprompt() {
-	local pwd
-	pwd=${PWD#${HOME}}
-	[ "${pwd}" != "${PWD}" ] && pwd="~${pwd}"
-	[ "${TERM%-*}" = 'xterm' ] \
-		&& printf '\33]0;%s\a' "${SSH_CLIENT:+${hostname}:}${pwd##*/}" >&2
-	printf '%s' "${SSH_CLIENT:+${hostname}:}${pwd}"
-}
-PS1='
-$ '
-RPS1='${?#0} $(rprompt)'
+PS1='\[\033]0;${SSH_CLIENT:+\\h:}\W\a\]
+${?#0}$ '