X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=2.9 required=5.0	tests=AWL,BAYES_00,TW_PD
X-Spam-Check-By: sourceware.org
From: "Bravery, Gavin S" <gavin.bravery@imperial.ac.uk>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: Slight issue in base-files-4.0-6
Date: Tue, 22 Mar 2011 15:33:28 +0000
Message-ID: <C5101A1534B7D7418DE06BC355FD7D63160EBBF3@icexch-m1.ic.ac.uk>
References: <C5101A1534B7D7418DE06BC355FD7D63160EB7CC@icexch-m1.ic.ac.uk>	<AANLkTi=UtNR3_FDwEFdT-=QnRMMs-bx-jqFvyU=L86BR@mail.gmail.com> <AANLkTimt4k4V7-8SQYYK+4N+hQFYnTZpxMxNiJd=W-MG@mail.gmail.com>
In-Reply-To: <AANLkTimt4k4V7-8SQYYK+4N+hQFYnTZpxMxNiJd=W-MG@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-IC-MsgID: 1Q23cv-0003oq-QS
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

>>> Basically, the escapes aren't working right (in XWindows at the very le=
ast).
>>>
>>> So I have now changed it to say:
>>> =A0 case "${KSH_VERSION}" in
>>> =A0 *MIRBSD*KSH* )
>>> =A0 =A0 PS1=3D$(print '^[]0;${PWD}\n^[[32m${USER}@${HOSTNAME}
>>> ^[[33m${PWD/${HOME}/~}^[[0m\n$ ')
>>> =A0 =A0 ;;
>>> =A0 *PD*KSH* )
>>> =A0 =A0 PS1=3D$(print '^[]0;${PWD}\n^[[32m${USER}@${HOSTNAME}=20
>>> ^[[33m${PWD}^[[0m\n$
>>> ')
>>> =A0 =A0 ;;
>>> =A0 esac
>>> Please note, ^[ means I have done CTRL-V + ESC.
>>> Also, MKSH and PDKSH need different settings, as PDKSH doesn't seem=20
>>> to have the ${name/pattern/replacement} syntax.
>> Although pdksh is still installable using setup.exe, it is officially=20
>> orphaned and upstream development ceased a long ago (5.2.14 is from=20
>> Jul '99, and cygwin's
>> 5.2.14-3 is from Dec '03).
>> If you want to use a ksh derivative, you are probably better switching=
=20
>> to mksh, which is actively mantained.
>> IOW, /etc/profile no longer supports pdksh. If you want to keep using=20
>> it, you'll need to explicitely add support for it (as you've done=20
>> already).
>Agreed, however, the point about properly escaping the PS1 fields still ho=
lds for mksh.  I hadn't noticed because I have my own custom .mshrc that se=
ts PS1.

Don't really mind. Just felt that whilst people could still install pdksh i=
t should work for that too.
Then when pdksh gets pulled off the install list properly, it could go from=
 profile file then (it's only a case tweak in the mean time anyway).

BTW, I have a side issue which is when mksh installs it doesn't make a ksh =
link, which means scripts with #!/usr/bin/ksh stop working.
That said, to be honest, I'm trying to move things to bash anyway :-)

Gavin

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

