www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/22/11:36:35

X-Recipient: archive-cygwin AT delorie DOT 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 DOT bravery AT imperial DOT ac DOT uk>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT 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 AT icexch-m1 DOT ic DOT ac DOT uk> <AANLkTi=UtNR3_FDwEFdT-=QnRMMs-bx-jqFvyU=L86BR AT mail DOT gmail DOT com> <AANLkTimt4k4V7-8SQYYK+4N+hQFYnTZpxMxNiJd=W-MG AT mail DOT gmail DOT com>
In-Reply-To: <AANLkTimt4k4V7-8SQYYK+4N+hQFYnTZpxMxNiJd=W-MG@mail.gmail.com>
MIME-Version: 1.0
X-IC-MsgID: 1Q23cv-0003oq-QS
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019