El mar, 25-07-2006 a las 17:01 +0200, LeVA escribió:
> Hi!
>
> I want to make my shell's prompt colourful :)
>
> I'm using pdksh. There are tons of information provided by google, but
> none of them are working.
>
> Setting my prompt to:
> PS1=$'\E[31m'$USER@$'\E[1;33m'`hostname -s`:$'\E[0m>'
>
> makes my prompt:
> $\E[31mleva@$\E[1;33mleva:$\E[0m>
>
> The colour codes gets ignored. Is this only working with the original
> korn shell? Is there colour support for the public domain korn shell?
>
> Thanks!
>
> Daniel
>
> --
> LeVA
>
>
Hi .. I never used this but I can say you that you are using 'text
strings' in that variable .. Everything you put enclosed in ' and " is a
'text string' in c, perl, php, bash and others.
PS1=$'\E[31m'$USER@$'\E[1;33m'`hostname -s`:$'\E[0m>'
The result looks like this
PS1=$'\E[31m'$USER@$'\E[1;33m'`hostname -s`:$'\E[0m>'
$ \E[31m leva@$ \E[1;33m leva :$ \E[0m>
Do you see?
Try to eliminate ' and try .. Maybe it works.
--
Leinier C. Salfran <salfrancl@ipigto.rimed.cu>
IPI "Jose Maceo Grajales"
Attachment:
signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente