Page 1 of 1

Newlisp prompt enhancement

Posted: Tue Jul 20, 2004 7:25 pm
by newdep
Hello Lutz,

As for the linux users we could enhance the prompt a little
for the users when in prompt mode.

Like we have (trace-highlight) for tracing i was thinking
of a (prompt-highlight). enhances the ">" whith a colour or
even with a time-prompt or whatever function is possible in
the prompt...

Norman

Posted: Fri Apr 11, 2008 8:26 am
by newdep
Ill give it another try..


Lutz, is it possible to give the default prompt "> " a color?
(<context><prompt>)

For all those linux-console users it would just cheer it up more..(just a tweak ;-)

I dont get it working from here seems snprintf does not handle ANSI by default?

Posted: Fri Apr 11, 2008 9:47 am
by newdep
here it is ... though? could trace-highlight be used to set it?



if(traceFlag)
snprintf(string, 31, "%s %d> ", context, recursionCount);
else
/* snprintf(string, 31, "%s> ", context ); */
snprintf(string, 31, "\033[1;36m%s\033[1;33m> \033[0m", context);