commit e18a4cacbd2dafa53e72c84b512266141eeb1552
parent a09814f7987a4be9fa9080e9f974660aed30044e
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 14 Nov 2019 11:01:13 +0100
Include hostname and exit status in PS1
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.kshrc b/.kshrc
@@ -6,4 +6,4 @@ set -o vi
HOSTNAME=${HOSTNAME:-$(uname -n)}
HOST=${HOSTNAME%%.*}
#export PS1="[32m\$(id -un)@${HOST} [34m\$( echo \$PWD | sed 's|$HOME|~|')[00m \$( if [ \$(id -u) -gt 0 ]; then print \$; else print \#; fi) "
-export PS1="\w \\$ "
+export PS1="\h:\w \${?#0}\\$ "