NetBSD-Users archive

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

Re: repeated hostname in PS1 in ksh

On Sat, 19 Jan 2013 18:19:03 -0600 (CST)
"Jeremy C. Reed" <> wrote:

> Many times, almost everytime, for years, my hostname is repeated when 
> shown in my PS1 prompt set by .profile in ksh:
> sunflowersunflower:reed$ echo $PS1
> sunflowersunflower:${PWD##/*/}$
> sunflowersunflower:reed$ grep PS1 ~/.profile
> PS1=`hostname -s`:'${PWD##/*/}'"$ "
> sunflowersunflower:reed$ PS1=`hostname -s`:'${PWD##/*/}'"$ "
> sunflower:reed$ ps $$
> 23885 pts/2 Ss   0:00.05 -ksh 
> I see this on other NetBSD systems with ksh too.
> Anyone seen this?

No, but looking at the files in /etc/skel/ my guess is:

"export ENV=$HOME/.shrc" comes after your PS1 setting in ~/.profile.
~/.shrc reads in /etc/shrc
/etc/shrc sets PS1="${HOST%%.*}$PS1" (where $HOST=`hostname`)

kind regards

> I will try to track down because I don't think I have ever seen it on my 
> 3.1 system.

Home | Main Index | Thread Index | Old Index