Jiaqiang Xu
2013-09-16 06:24:30 UTC
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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20130916/56f5fe6b/attachment.html>
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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.research.att.com/pipermail/ast-developers/attachments/20130916/56f5fe6b/attachment.html>