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

* Re: Slight issue in base-files-4.0-6
  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
  0 siblings, 1 reply; 14+ messages in thread
From: David Sastre @ 2011-03-22 14:47 UTC (permalink / raw)
  To: cygwin

2011/3/22, Bravery, Gavin S wrote:
> I have a minor issue with the /etc/profile file in base files.
>
> 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.

Hello,

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

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

* Re: Slight issue in base-files-4.0-6
  2011-03-22 14:47 ` David Sastre
@ 2011-03-22 14:59   ` Chris Sutcliffe
  2011-03-22 16:13     ` Bravery, Gavin S
  0 siblings, 1 reply; 14+ messages in thread
From: Chris Sutcliffe @ 2011-03-22 14:59 UTC (permalink / raw)
  To: cygwin

On 22 March 2011 10:34, David Sastre wrote:
> 2011/3/22, Bravery, Gavin S wrote:
>> 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.

Cheers,

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

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

* RE: Slight issue in base-files-4.0-6
  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 18:02       ` Slight issue in base-files-4.0-6 Chris Sutcliffe
  0 siblings, 2 replies; 14+ messages in thread
From: Bravery, Gavin S @ 2011-03-22 16:13 UTC (permalink / raw)
  To: cygwin

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

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

* Re: Slight issue in base-files-4.0-6
  2011-03-22 16:13     ` Bravery, Gavin S
@ 2011-03-22 16:58       ` David Sastre
  2011-03-22 16:59         ` Bravery, Gavin S
                           ` (3 more replies)
  2011-03-22 18:02       ` Slight issue in base-files-4.0-6 Chris Sutcliffe
  1 sibling, 4 replies; 14+ messages in thread
From: David Sastre @ 2011-03-22 16:58 UTC (permalink / raw)
  To: cygwin

2011/3/22, Bravery, Gavin S wrote:
>>>> 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.

WJFFM with the PS1 setting included in 4.0-6 for mksh.

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

Maybe it should be considered to drop pdksh from the distro, being
mksh a mantained replacement and pdksh orphaned and upstream
unmantained.

> 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 :-)

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

* RE: Slight issue in base-files-4.0-6
  2011-03-22 16:58       ` David Sastre
@ 2011-03-22 16:59         ` Bravery, Gavin S
  2011-03-24 15:08           ` Chris Sutcliffe
  2011-03-22 17:39         ` Corinna Vinschen
                           ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Bravery, Gavin S @ 2011-03-22 16:59 UTC (permalink / raw)
  To: cygwin

>>> 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.
>WJFFM with the PS1 setting included in 4.0-6 for mksh.

Just tried and for mksh it IS ok with \033. Must just be pdksh which has the problem.
That said, mksh works with ^[ too.

>> 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).
>Maybe it should be considered to drop pdksh from the distro, being mksh a mantained replacement and pdksh orphaned and upstream unmantained.

We'd need mksh to network shares for homes first though.
My home is: //<servername>/gbravery and it really doesn't like it.

Gavin




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

* Re: Slight issue in base-files-4.0-6
  2011-03-22 16:58       ` David Sastre
  2011-03-22 16:59         ` 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
  3 siblings, 0 replies; 14+ messages in thread
From: Corinna Vinschen @ 2011-03-22 17:39 UTC (permalink / raw)
  To: cygwin

On Mar 22 17:13, David Sastre wrote:
> Maybe it should be considered to drop pdksh from the distro, being
> mksh a mantained replacement and pdksh orphaned and upstream
> unmantained.

Given that the latest pdksh package is from 2003, this sounds like a
really good idea to me.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

* Re: Slight issue in base-files-4.0-6
  2011-03-22 16:58       ` David Sastre
  2011-03-22 16:59         ` 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
  3 siblings, 0 replies; 14+ messages in thread
From: Chris Sutcliffe @ 2011-03-22 17:40 UTC (permalink / raw)
  To: cygwin

On 22 March 2011 12:13, David Sastre wrote:
> WJFFM with the PS1 setting included in 4.0-6 for mksh.

Indeed it does, I guess I should have tested it.  The previous
(pre-4.0) /etc/profile did not set PS1 correctly for mksh.

Sorry for the noise.

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

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

* Re: Slight issue in base-files-4.0-6
  2011-03-22 16:13     ` Bravery, Gavin S
  2011-03-22 16:58       ` David Sastre
@ 2011-03-22 18:02       ` Chris Sutcliffe
  1 sibling, 0 replies; 14+ messages in thread
From: Chris Sutcliffe @ 2011-03-22 18:02 UTC (permalink / raw)
  To: cygwin

On 22 March 2011 11:33, Bravery, Gavin S wrote:
> 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.

Indeed, I should really fix that.  I'll look into how to create a
postinstall script to create the link.

Cheers!

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

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

* Drop pdksh?
  2011-03-22 16:58       ` David Sastre
                           ` (2 preceding siblings ...)
  2011-03-22 17:40         ` Chris Sutcliffe
@ 2011-03-22 23:39         ` Christopher Faylor
  2011-03-23  0:24           ` Christopher Faylor
  2011-03-24 17:35           ` Brian Wilson
  3 siblings, 2 replies; 14+ messages in thread
From: Christopher Faylor @ 2011-03-22 23:39 UTC (permalink / raw)
  To: cygwin

On Tue, Mar 22, 2011 at 05:13:02PM +0100, David Sastre wrote:
>Maybe it should be considered to drop pdksh from the distro, being
>mksh a mantained replacement and pdksh orphaned and upstream
>unmantained.

This sounds like a good idea to me.  Should I make this happen?

cgf

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

* Re: Drop pdksh?
  2011-03-22 23:39         ` Drop pdksh? Christopher Faylor
@ 2011-03-23  0:24           ` Christopher Faylor
  2011-03-24 17:35           ` Brian Wilson
  1 sibling, 0 replies; 14+ messages in thread
From: Christopher Faylor @ 2011-03-23  0:24 UTC (permalink / raw)
  To: cygwin

On Tue, Mar 22, 2011 at 12:42:45PM -0400, Christopher Faylor wrote:
>On Tue, Mar 22, 2011 at 05:13:02PM +0100, David Sastre wrote:
>>Maybe it should be considered to drop pdksh from the distro, being
>>mksh a mantained replacement and pdksh orphaned and upstream
>>unmantained.
>
>This sounds like a good idea to me.  Should I make this happen?

pdksh is now in the category "_obsolete".

Let's take a moment of silence to remember Igor Pechtchanski's many
contributions to the project.

pdksh, we hardly knew ye.

cgf

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

* Re: Slight issue in base-files-4.0-6
  2011-03-22 16:59         ` Bravery, Gavin S
@ 2011-03-24 15:08           ` Chris Sutcliffe
  2011-03-25 13:02             ` Bravery, Gavin S
  0 siblings, 1 reply; 14+ messages in thread
From: Chris Sutcliffe @ 2011-03-24 15:08 UTC (permalink / raw)
  To: cygwin

On 22 March 2011 12:55, Bravery, Gavin S wrote:
> We'd need mksh to network shares for homes first though.
> My home is: //<servername>/gbravery and it really doesn't like it.

The newly released mksh-39c-3 handles UNC paths correctly now.

Cheers!

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d

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

* Re: Drop pdksh?
  2011-03-22 23:39         ` Drop pdksh? Christopher Faylor
  2011-03-23  0:24           ` Christopher Faylor
@ 2011-03-24 17:35           ` Brian Wilson
  1 sibling, 0 replies; 14+ messages in thread
From: Brian Wilson @ 2011-03-24 17:35 UTC (permalink / raw)
  To: cygwin

> On Tue, Mar 22, 2011 at 05:13:02PM +0100, David Sastre wrote:
> >Maybe it should be considered to drop pdksh from the distro, being
> >mksh a mantained replacement and pdksh orphaned and upstream
> >unmantained.
> 
> This sounds like a good idea to me.  Should I make this happen?
> 
> cgf

Oh great computer,

We pause a moment to remember your program pdksh who served the users faithfully 
and well for so many CPU cycles.  We ask that you accept it's bits and comfort 
those who have come to rely on, and will now miss, this your shell interpreter 
as we lay it's memory space to rest.  We know your will is often difficult to 
understand as to why you have chosen to remove this program from our disk.

Never the less better it than me.

Amen.

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

* RE: Slight issue in base-files-4.0-6
  2011-03-24 15:08           ` Chris Sutcliffe
@ 2011-03-25 13:02             ` Bravery, Gavin S
  0 siblings, 0 replies; 14+ messages in thread
From: Bravery, Gavin S @ 2011-03-25 13:02 UTC (permalink / raw)
  To: Chris Sutcliffe, cygwin

>> We'd need mksh to network shares for homes first though.
>> My home is: //<servername>/gbravery and it really doesn't like it.
>The newly released mksh-39c-3 handles UNC paths correctly now.

Now that's much better! My #! stuff works and it copes with my home being a UNC perfectly.
I've removed my home-spun pdksh (which included old Debian fixes) and moved over.
Thanks very much Chris for the rapid response, much appreciated.

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