This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Slight issue in base-files-4.0-6
- From: "Bravery, Gavin S" <gavin dot bravery at imperial dot ac dot uk>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Tue, 22 Mar 2011 13:31:13 +0000
- Subject: Slight issue in base-files-4.0-6
Hi everyone,
I have a minor issue with the /etc/profile file in base files.
I fixed it a while back but the changes over the last few days broke it again (which made me remember I had done it, which then made me tell you :-).
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.
Thanks for all the work on this, CYGWIN is an excellent tool!
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