diff options
author | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-05-30 18:01:02 +0200 |
---|---|---|
committer | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-05-30 20:46:49 +0200 |
commit | fbf64c45c987e8197c938437c70af981d9120839 (patch) | |
tree | c55365f6ace39d47ec12ca145a1037ee51876746 | |
parent | aa1be716a066f003832efb36748d71c2e073418d (diff) | |
download | lbsd-fbf64c45c987e8197c938437c70af981d9120839.tar.gz |
shrc: Fix prompt
-rw-r--r-- | etc/shrc | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |