public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Bravery, Gavin S" <gavin.bravery@imperial.ac.uk>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: Slight issue in base-files-4.0-6
Date: Tue, 22 Mar 2011 16:13:00 -0000	[thread overview]
Message-ID: <C5101A1534B7D7418DE06BC355FD7D63160EBBF3@icexch-m1.ic.ac.uk> (raw)
In-Reply-To: <AANLkTimt4k4V7-8SQYYK+4N+hQFYnTZpxMxNiJd=W-MG@mail.gmail.com>

>>> 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.
>> 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.

Don't really mind. Just felt that whilst people could still install pdksh it 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

  reply	other threads:[~2011-03-22 15:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 14:10 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C5101A1534B7D7418DE06BC355FD7D63160EBBF3@icexch-m1.ic.ac.uk \
    --to=gavin.bravery@imperial.ac.uk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).