Newlisp prompt enhancement

Q&A's, tips, howto's
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Newlisp prompt enhancement

Post 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
-- (define? (Cornflakes))

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post 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?
-- (define? (Cornflakes))

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post 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);
-- (define? (Cornflakes))

Locked