delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/22/12:13:41

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_PD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <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> <C5101A1534B7D7418DE06BC355FD7D63160EBBF3 AT icexch-m1 DOT ic DOT ac DOT uk>
Date: Tue, 22 Mar 2011 17:13:02 +0100
Message-ID: <AANLkTikO=5aYzwMVyfjDC5h3m9pGZmatOWtZqcWNyxGX@mail.gmail.com>
Subject: Re: Slight issue in base-files-4.0-6
From: David Sastre <d DOT sastre DOT medina AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

2011/3/22, Bravery, Gavin S wrote:
>>>> Basically, the escapes aren't working right (in XWindows at the very
>>>> least).
>>>>
>>>> So I have now changed it to say:
>>>>   case "${KSH_VERSION}" in
>>>>   *MIRBSD*KSH* )
>>>>     PS1=$(print '^[]0;${PWD}\n^[[32m${USER}@${HOSTNAME}
>>>> ^[[33m${PWD/${HOME}/~}^[[0m\n$ ')
>>>>     ;;
>>>>   *PD*KSH* )
>>>>     PS1=$(print '^[]0;${PWD}\n^[[32m${USER}@${HOSTNAME}
>>>> ^[[33m${PWD}^[[0m\n$
>>>> ')
>>>>     ;;
>>>>   esac
>>>> Please note, ^[ means I have done CTRL-V + ESC.
>>>> Also, MKSH and PDKSH need different settings, as PDKSH doesn't seem
>>>> to have the ${name/pattern/replacement} syntax.
>>> Although pdksh is still installable using setup.exe, it is officially
>>> orphaned and upstream development ceased a long ago (5.2.14 is from
>>> 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
>>> to mksh, which is actively mantained.
>>> IOW, /etc/profile no longer supports pdksh. If you want to keep using
>>> it, you'll need to explicitely add support for it (as you've done
>>> already).
>>Agreed, however, the point about properly escaping the PS1 fields still
>> holds for mksh.  I hadn't noticed because I have my own custom .mshrc that
>> sets PS1.

WJFFM with the PS1 setting included in 4.0-6 for mksh.

> Don't really mind. Just felt that whilst people could still install pdksh it
> 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).

Maybe it should be considered to drop pdksh from the distro, being
mksh a mantained replacement and pdksh orphaned and upstream
unmantained.

> 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 :-)

--
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