*BSD News Article 83552


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!news-peer.gsl.net!news.gsl.net!ix.netcom.com!netcom.com!stanb
From: stanb@netcom.com (Stan Brown)
Subject: Subtle difference between "real" ksh and FreeBSD ksh ?
Message-ID: <stanbE1EpwA.Gqv@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: NN version 6.5.0 #3 (NOV)
Date: Mon, 25 Nov 1996 03:33:45 GMT
Lines: 36
Sender: stanb@netcom2.netcom.com

	I am having a little trouble with the ksh that is provided with
FreeBSD.

	here is the nature of the problem. I have a failry comples promptthat I
use on several deifferent machines. Here is how it's set up

-----------

if [[ $TERM = "xterm" ]] ; then
PS1="]0\;$LOGNAME@$NODE;"'${PWD}'"$LOGNAME@$NODE:"'${PWD}\
$ ' 
else
PS1="
$LOGNAME@$NODE:"'${PWD}\
$ '
fi

-----------

	This prompt gives me the name of the machine that I am on, and the
current working directory on any terminal. If the terminal is an xterm, it
puts the same thing in the title of the xterm.

	This works on HP, Su, and Linux versions of ksh. With the freeBSD
version, if it's not an xterm, it *almost( works. The only problem is the
lack of a newline at the end of the prompt. On a xterm it's horibly broke.
I get no prompt at all. I think the proble lies in how backslashed escaped
sequences are interperted.

	Can anyone give me some advice on this?

-- 
Stan Brown     stanb@netcom.com                                    404-996-6955
Factory Automation Systems
Atlanta Ga.
-- 
Look, look, see Windows 95.  Buy, lemmings, buy!   
Pay no attention to that cliff ahead...            Henry Spencer
(c) 1996 Stan Brown.  Redistribution via the Microsoft Network is prohibited.