bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to workaroun 'nl' being added: Working now! Tnx!


From: Linda Walsh
Subject: Re: how to workaroun 'nl' being added: Working now! Tnx!
Date: Mon, 14 Feb 2011 10:50:13 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Thunderbird/2.0.0.24 Mnenhy/0.7.6.666

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;address@hidden:${_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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]