From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20523 invoked by alias); 22 Mar 2011 14:34:19 -0000 Received: (qmail 20461 invoked by uid 22791); 22 Mar 2011 14:34:18 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,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 Received: from mail-qw0-f43.google.com (HELO mail-qw0-f43.google.com) (209.85.216.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Mar 2011 14:34:06 +0000 Received: by qwf6 with SMTP id 6so6297974qwf.2 for ; Tue, 22 Mar 2011 07:34:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.8.195 with SMTP id i3mr4956093qci.26.1300804444507; Tue, 22 Mar 2011 07:34:04 -0700 (PDT) Received: by 10.229.47.65 with HTTP; Tue, 22 Mar 2011 07:34:04 -0700 (PDT) In-Reply-To: References: Date: Tue, 22 Mar 2011 14:47:00 -0000 Message-ID: Subject: Re: Slight issue in base-files-4.0-6 From: David Sastre To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-03/txt/msg00638.txt.bz2 2011/3/22, Bravery, Gavin S wrote: > I have a minor issue with the /etc/profile file in base files. > > I still use KSH (generally pdksh) and there is a problem with how this file > is setting PS1. > 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. Hello, 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). -- 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