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

Re: PS1



Marcelo Leal, 2002-Mar-13 14:57 +0000:
>   hi folks, 
>   why my PS1 variable is \u@\h:\w\$ in console (not X). And in X (eterm)
> is \s-\v\$ ???
>   i wanna the first way... in the second only bash version appears.
>   thanks!

I control my prompts from my ~/.bashrc with this:

if [ "$PS1" ]; then

    PS1='[\#] $ '

    case $TERM in
    Eterm*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
 	;;
    xterm*)
        PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
	;;
    linux*)
        PS1='\u@\h:\w\$'
	;;
    *)
	;;
    esac
fi

This keys off the $TERM variable.

jc

--
Jeff Coppock		Systems Engineer
Diggin' Debian		Admin and User



Reply to: