public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Slight issue in base-files-4.0-6
@ 2011-03-22 14:10 Bravery, Gavin S
  2011-03-22 14:47 ` David Sastre
  0 siblings, 1 reply; 14+ messages in thread
From: Bravery, Gavin S @ 2011-03-22 14:10 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-03-25  9:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-22 14:10 Slight issue in base-files-4.0-6 Bravery, Gavin S
2011-03-22 14:47 ` David Sastre
2011-03-22 14:59   ` Chris Sutcliffe
2011-03-22 16:13     ` Bravery, Gavin S
2011-03-22 16:58       ` David Sastre
2011-03-22 16:59         ` Bravery, Gavin S
2011-03-24 15:08           ` Chris Sutcliffe
2011-03-25 13:02             ` Bravery, Gavin S
2011-03-22 17:39         ` Corinna Vinschen
2011-03-22 17:40         ` Chris Sutcliffe
2011-03-22 23:39         ` Drop pdksh? Christopher Faylor
2011-03-23  0:24           ` Christopher Faylor
2011-03-24 17:35           ` Brian Wilson
2011-03-22 18:02       ` Slight issue in base-files-4.0-6 Chris Sutcliffe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).