From fbf64c45c987e8197c938437c70af981d9120839 Mon Sep 17 00:00:00 2001 From: "John Ankarstr\\xf6m" Date: Sun, 30 May 2021 18:01:02 +0200 Subject: shrc: Fix prompt --- etc/shrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'etc') diff --git a/etc/shrc b/etc/shrc index 76f9b4c..77f2ec2 100644 --- a/etc/shrc +++ b/etc/shrc @@ -8,9 +8,10 @@ case "$-" in *i*) if /bin/test -z "${HOST}"; then HOST="$(hostname)" fi - case "$TERM" in - x*) PS1=' ]2;$PWD'${HOST%%.*}$PS1 ;; - *) PS1=${HOST%%.*}$PS1 ;; + /bin/test "$(whoami)" = root && PS1='# ' || PS1='$ ' + case "$0,$TERM" in + *ksh,xterm*) PS1=' ]2;$PWD'${HOST%%.*}$PS1 ;; + *) PS1=${HOST%%.*}$PS1 ;; esac set -o emacs # This file is used by shells that might not support -- cgit v1.2.3