From 1faa14a4794ec2d54ff69a628f9b64e3d292d361 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 17 Dec 2016 18:46:04 +1300 Subject: Knock out $HOST from kshrc Not needed really --- ksh/kshrc | 3 +-- ksh/kshrc.d/prompt.ksh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ksh/kshrc b/ksh/kshrc index c45d4018..2f0d31a6 100644 --- a/ksh/kshrc +++ b/ksh/kshrc @@ -6,9 +6,8 @@ set -o emacs HISTFILE=$HOME/.ksh_history HISTSIZE=$((1 << 10)) -# If HOST and HOSTNAME aren't set by this version of ksh, set them +# If HOSTNAME isn't set by this version of ksh, set it HOSTNAME=$(uname -n) -HOST=${HOSTNAME%%.*} # Load any supplementary scripts for kshrc in "$HOME"/.kshrc.d/*.ksh ; do diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh index 8fbce020..397a1b91 100644 --- a/ksh/kshrc.d/prompt.ksh +++ b/ksh/kshrc.d/prompt.ksh @@ -15,7 +15,7 @@ prompt() { # Basic prompt shape depends on whether we're in SSH or not PS1= if [[ -n $SSH_CLIENT ]] || [[ -n $SSH_CONNECTION ]] ; then - PS1=$PS1'$USER@$HOST:' + PS1=$PS1'$USER@${HOSTNAME%%.*}:' fi # Add sub-commands; working directory with ~ abbreviation, VCS, -- cgit v1.2.3