Mail Archives: cygwin/2011/03/22/11:36:35
>>> Basically, the escapes aren't working right (in XWindows at the very le=
ast).
>>>
>>> So I have now changed it to say:
>>> =A0 case "${KSH_VERSION}" in
>>> =A0 *MIRBSD*KSH* )
>>> =A0 =A0 PS1=3D$(print '^[]0;${PWD}\n^[[32m${USER}@${HOSTNAME}
>>> ^[[33m${PWD/${HOME}/~}^[[0m\n$ ')
>>> =A0 =A0 ;;
>>> =A0 *PD*KSH* )
>>> =A0 =A0 PS1=3D$(print '^[]0;${PWD}\n^[[32m${USER}@${HOSTNAME}=20
>>> ^[[33m${PWD}^[[0m\n$
>>> ')
>>> =A0 =A0 ;;
>>> =A0 esac
>>> Please note, ^[ means I have done CTRL-V + ESC.
>>> Also, MKSH and PDKSH need different settings, as PDKSH doesn't seem=20
>>> to have the ${name/pattern/replacement} syntax.
>> Although pdksh is still installable using setup.exe, it is officially=20
>> orphaned and upstream development ceased a long ago (5.2.14 is from=20
>> 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=
=20
>> to mksh, which is actively mantained.
>> IOW, /etc/profile no longer supports pdksh. If you want to keep using=20
>> it, you'll need to explicitely add support for it (as you've done=20
>> already).
>Agreed, however, the point about properly escaping the PS1 fields still ho=
lds for mksh. I hadn't noticed because I have my own custom .mshrc that se=
ts PS1.
Don't really mind. Just felt that whilst people could still install pdksh i=
t 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
- Raw text -