Le 01/05/2010 05:25, Chris Sutcliffe a écrit :
The PS1 definition for ksh in /etc/profile uses the literal ascii
characters '^[' for the escape sequence as opposed to the single byte
escape control code.  The attached patch corrects that as well as
HOSTNAME not being set correctly (at least for mksh).

the right way to go would be something like :

the current way :
PS1=$(print '\033]0;${pwd}\n\033[32m${us...@${hostname} \033[33m${PWD}\033[0m\n$ ')

w/ tilde expansion as bash does :
TILDE=\~
PS1=$(print '\033]0;${TILDE[(1-0${PWD%%@([!/]*|${HOME}*)}1)]:-}${pwd#${home}}\n\033[32m${us...@${hostname} \033[33m${TILDE[(1-0${PWD%%@([!/]*|${HOME}*)}1)]:-}${PWD#${HOME}}\033[0m\n$ ')

so, you can still print the file w/o side effects

Regards,

Cyrille Lefevre
--
mailto:cyrille.lefevre-li...@laposte.net




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

Reply via email to