public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Mark J. Reed" <markjreed@mail.com>
To: cygwin@cygwin.com
Subject: Re: pdksh package: Error when issuing a 'typeset -r' statement
Date: Wed, 14 May 2008 08:22:00 -0000	[thread overview]
Message-ID: <f60fe000805131954o43dc98fcoc79c7d93b8999fe6@mail.gmail.com> (raw)
In-Reply-To: <82ba77b80805131833x59a01bb9n246aca58f996b427@mail.gmail.com>

On Tue, May 13, 2008 at 9:33 PM, Matthew Pettis
<matthew.pettis@gmail.com> wrote:

>  I installed cygwin with the 'pdksh' package.  When I try to run issue
>  anything like the following:
>
>  $ typeset -r x=1
>
>  I get the error:
>
>  pdksh: x: is read only

This is a known 8+-year-old bug in pdksh, which as far as I can tell
is no longer being maintained by anyone (pointers to the contrary
welcome).  Why do you want pdksh?  Isn't Gen-u-wine ksh available for
Cygwin?

Anyway, it's setting the readonly flag (typeset -r) before
initializing the var instead of after.  Nothing to do with Cygwin -
you'll see the same error with pdksh 5.2.14 on NetBSD, OS X, Linux,
etc.  There's a patch that the Cygwin maintainer could apply to the
package, which fixes this and two other bugs:

http://www.cs.mun.ca/~michael/pdksh/files/pdksh-5.2.14-patches.1

There's also a patches.2; not sure what it fixes.  Note that the file
dates are bogus; the .1 patch dates back at least to November 2000.

>  P.S.  - I also have a weird prompt, as seen below... Haven't
>  researched that, as it is not critical, but if anyone knows offhand...
>
>  \[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n$

That's just a heavily bash-ified prompt as it appears in ksh; guess
the Cygwin shell init files set that up in a "profile" somewhere
instead of a "bash_profile".  Tsk.   Easiest fix is to just set PS1 to
something more ksh-friendly in your own .profile.
-- 
Mark J. Reed <markjreed@gmail.com>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

  reply	other threads:[~2008-05-14  2:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14  2:54 Matthew Pettis
2008-05-14  8:22 ` Mark J. Reed [this message]
2008-05-14 13:29   ` Mark J. Reed
2008-05-15 15:00     ` phil long
2008-05-15 16:14       ` Mark J. Reed
2008-05-14 21:48 Matthew Pettis

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=f60fe000805131954o43dc98fcoc79c7d93b8999fe6@mail.gmail.com \
    --to=markjreed@mail.com \
    --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).