lua-users home
lua-l archive

Color escapes for terminals (Linux)

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi everyone.
I have seen in a recent post a patch to print correctly[?] "0円" 
escapes in terminals. However I'd really like to use the
'official' Lua to do that. 
I am currently trying to write some scripts and it is a
_necessity_ having an easy to check output. Note that plain color
is not an option... Tried many things including string.format(),
google and lua-user-wiki without any luck. 
May I need a Lua/C module or patch to do just that?
Is there some clue in io.stdout() ?
Examples:
---------
bash>	echo -e "033円[01;31mError" -> Error (red)
perl> 	print "033円[01;31mError" -> Error (red)
python> print "033円[01;31mError" -> Error (red)
C: 	printf("033円[01;31mError") -> Error (red)
lua>	print "033円[01;31mError" -> ![01;31mError
Hopefully this isn't a duplicate post. Thanks for your time.
--
Mario G.H.

AltStyle によって変換されたページ (->オリジナル) /