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" To: "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: References: In-Reply-To: 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 AT cygwin DOT com; run by ezmlm List-Id: 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 >>> 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