Ah...Caught the addition of the _prompt var as separate.
It works now:
if [ -n "$_sh_interactive_shell" ] ; then
shopt -s cdspell checkhash checkwinsize cmdhist dotglob extglob
shopt -s histappend hostcomplete lithist
shopt -s no_empty_cmd_completion xpg_echo
# build a prompt ###########
#specific to linux console compat emulations
_CRed=$(tput setaf 1) #Red
_CRST=$(tput sgr0) #Reset
_CBLD=$(tput bold) #Bold
PUBLIC _prompt_open="" _prompt_close="" _prompt=">"
PUBLIC _disp_port=${DISPLAY/[^:]*:/}
[[ $UID -eq 0 ]] && {
_prompt_open="$_CBLD$_CRed"
_prompt="#"
_prompt_close="$_CRST"
}
PS1='\[$_prompt_open\]$(pwd "$PWD")$_prompt\[$_prompt_close\] ';
#PS1='\[$_prompt_open\}$(spwd "$PWD")[$_prompt_close\] ';
if [ -n ${REMOTEHOST:-""} ]; then
#set_icon_and_title
PUB_CONST _pshost=$(echo -en
"\033]1;${USER}@${HOSTNAME}:${_disp_port}\007")
PS1='\[$_pshost$_prompt_open\]${HOSTNAME}:$(spwd
"$PWD")$_prompt\[$_prompt_close\] '
fi
PS2='> '
PUBLIC PS1 PS2
########
#setup TTY settings
----
The above is only executed on logins/logouts...
Yes...I caught my previous use of \[ \] around _pshost... so I had
used it before, but either didn't know what it did, or had forgotten.
Sigh. Too much clutter in brain. Having the index jumbled a few times
doesn't help either! ;-)
Thanks!
Linda