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: References: Date: Tue, 22 Mar 2011 10:46:50 -0400 Message-ID: Subject: Re: Slight issue in base-files-4.0-6 From: Chris Sutcliffe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 22 March 2011 10:34, David Sastre wrote: > 2011/3/22, Bravery, Gavin S wrote: >> Basically, the escapes aren't working right (in XWindows at the very lea= st). >> >> 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} ^[[33m${PW= D}^[[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 to h= ave >> 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. Cheers, Chris --=20 Chris Sutcliffe http://emergedesktop.org http://www.google.com/profiles/ir0nh34d -- 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