Hi guys,

I'm slowly switching from bash to mksh. So far, I like mksh and it's a real
pleasure to use it.
I sent this email because I need some informations about PS1 and printf().
I came on IRC channel but it was kinda quiet.

I write many shell scripts and I try to make them POSIX friendly. That's
why I'm using printf() instead of echo. I saw mksh has no built-in printf
command (I don't want to include printf.c before compilation).
I could use echo. Sometimes I need to add color but "echo -e" isn't
supported by POSIX echo.
So, I think I'm stuck. Any advices?

Another question, I'm trying to export my bash PS1 to mksh. On bash, I can
apply a color on the typed command and another color on the output.
I use the following line: "trap "printf '\e[0m'" DEBUG". I tried to export
it on mksh, but I failed.
It seems trap DEBUG isn't implemented on mksh, do you know a hack for my
need?

Thanks a lot for this help.
Best regards.

--
H.Moretto

Reply via email to