please post the original assignment of PS1
maybe its in your .profile or $ENV file?

On Mon, 16 Sep 2013 14:24:30 +0800 Jiaqiang Xu wrote:
> --===============0475043982206599680==
> Content-Type: multipart/alternative; boundary=047d7bacb98ec43c9d04e67a410f

> --047d7bacb98ec43c9d04e67a410f
> Content-Type: text/plain; charset=ISO-8859-1

> Hello all:

> After I compiled the ksh executable from the source in the cygwin
> environment, I ran it and found some errors with the PS1 value:

> root@ls21n06:~ $ mmksh.cygwin
> mmksh.cygwin: line 1: syntax error: `|' unexpected
> ${|
>         local e=$?

>         (( e )) && REPLY+="$e|"
>         REPLY+=${USER:=$(ulimit -c 0; id -un 2>/dev/null || echo \?)}
>         REPLY+=@${HOSTNAME%%.*}:

>         local d=${PWD:-?} p=~; [[ $p = ?(*/) ]] || d=${d/#$p/~}
>         local m=${%d} n p=...; (( m > 0 )) || m=${#d}
>         (( m > (n = (COLUMNS/3 < 7 ? 7 : COLUMNS/3)) )) && d=${d:(-n)} || p=
>         REPLY+=$p$d

>         return $e
> } $

> I need to export PS1 to '#' value manually to avoid this error.   I wonder
> where in the C source code of ksh I can change to control the PS1 of the
> ksh executable. Thank you very much!

> Best,

> Jiaqiang

> --047d7bacb98ec43c9d04e67a410f
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable

> <div dir=3D"ltr">Hello all:<div><br></div><div>After I compiled the ksh exe=
> cutable from the source in the cygwin environment, I ran it and found some =
> errors with the PS1 value:</div><div><br></div><div><div>root@ls21n06:~ $ m=
> mksh.cygwin</div>
> <div>mmksh.cygwin: line 1: syntax error: `|&#39; unexpected</div><div>${|</=
> div><div>=A0 =A0 =A0 =A0 local e=3D$?</div><div><br></div><div>=A0 =A0 =A0 =
> =A0 (( e )) &amp;&amp; REPLY+=3D&quot;$e|&quot;</div><div>=A0 =A0 =A0 =A0 R=
> EPLY+=3D${USER:=3D$(ulimit -c 0; id -un 2&gt;/dev/null || echo \?)}</div>
> <div>=A0 =A0 =A0 =A0 REPLY+=3D@${HOSTNAME%%.*}:</div><div><br></div><div>=
> =A0 =A0 =A0 =A0 local d=3D${PWD:-?} p=3D~; [[ $p =3D ?(*/) ]] || d=3D${d/#$=
> p/~}</div><div>=A0 =A0 =A0 =A0 local m=3D${%d} n p=3D...; (( m &gt; 0 )) ||=
>  m=3D${#d}</div><div>=A0 =A0 =A0 =A0 (( m &gt; (n =3D (COLUMNS/3 &lt; 7 ? 7=
>  : COLUMNS/3)) )) &amp;&amp; d=3D${d:(-n)} || p=3D</div>
> <div>=A0 =A0 =A0 =A0 REPLY+=3D$p$d</div><div><br></div><div>=A0 =A0 =A0 =A0=
>  return $e</div><div>} $</div></div><div><br></div><div><br></div><div>I ne=
> ed to export PS1 to &#39;#&#39; value manually to avoid this error. =A0 I w=
> onder where in the C source code of ksh I can change to control the PS1 of =
> the ksh executable. Thank you very much!</div>
> <div><br></div><div>Best,</div><div><br></div><div>Jiaqiang</div></div>

> --047d7bacb98ec43c9d04e67a410f--

> --===============0475043982206599680==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline

> _______________________________________________
> ast-developers mailing list
> [email protected]
> http://lists.research.att.com/mailman/listinfo/ast-developers

> --===============0475043982206599680==--

_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to