Re: Color your terminal's output

2013-03-10 Thread Jens Mueller
Axl wrote: When I run: $ dmd -unittest -m64 /usr/lib/x86_64-linux-gnu/libncurses.a -run terminal.d I get the follwoing output: terminal.o: In function `_D8terminal12_staticCtor2FZv': terminal.d:(.text._D8terminal12_staticCtor2FZv+0x27): undefined reference to `setupterm'

Re: Color your terminal's output

2013-03-10 Thread Axl
On Sunday, 10 March 2013 at 14:38:15 UTC, Jens Mueller wrote: Axl wrote: When I run: $ dmd -unittest -m64 /usr/lib/x86_64-linux-gnu/libncurses.a -run terminal.d I get the follwoing output: terminal.o: In function `_D8terminal12_staticCtor2FZv':

Re: Color your terminal's output

2013-03-10 Thread Jens Mueller
Axl wrote: On Sunday, 10 March 2013 at 14:38:15 UTC, Jens Mueller wrote: Axl wrote: When I run: $ dmd -unittest -m64 /usr/lib/x86_64-linux-gnu/libncurses.a -run terminal.d I get the follwoing output: terminal.o: In function `_D8terminal12_staticCtor2FZv':

Re: Color your terminal's output

2013-03-09 Thread Axl
When I run: $ dmd -unittest -m64 /usr/lib/x86_64-linux-gnu/libncurses.a -run terminal.d I get the follwoing output: terminal.o: In function `_D8terminal12_staticCtor2FZv': terminal.d:(.text._D8terminal12_staticCtor2FZv+0x27): undefined reference to `setupterm'

Re: Color your terminal's output

2011-12-14 Thread Jens Mueller
Iain S wrote: Just to add my 2 cents... I have been looking for a simple way of altering the Windows terminal colour, so I would personally say this is worth including - or at the very least converting into a usable header/module/???. I am very new to D, so I can't figure out how to make

Re: Color your terminal's output

2011-12-13 Thread Iain S
Just to add my 2 cents... I have been looking for a simple way of altering the Windows terminal colour, so I would personally say this is worth including - or at the very least converting into a usable header/module/???. I am very new to D, so I can't figure out how to make use of the code

Re: Color your terminal's output

2011-10-10 Thread Jens Mueller
Marco Leise wrote: Am 09.10.2011, 12:32 Uhr, schrieb Jens Mueller jens.k.muel...@gmx.de: Johannes Pfau wrote: Jens Mueller wrote: BTW: you could also use isatty (http://linux.die.net/man/3/isatty) to detect if stdout has been redirected and disable color output in that case. For windows:

Re: Color your terminal's output

2011-10-10 Thread Jens Mueller
Johannes Pfau wrote: Jens Mueller wrote: Johannes Pfau wrote: Jens Mueller wrote: Johannes Pfau wrote: You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and

Re: Color your terminal's output

2011-10-09 Thread Jens Mueller
Johannes Pfau wrote: Jens Mueller wrote: Johannes Pfau wrote: You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and can be used as a dynamic library, so I don't

Re: Color your terminal's output

2011-10-09 Thread Jens Mueller
Johannes Pfau wrote: Jens Mueller wrote: Trass3r wrote: You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and can be used as a dynamic library, so I don't think

Re: Color your terminal's output

2011-10-09 Thread Johannes Pfau
Jens Mueller wrote: Johannes Pfau wrote: Jens Mueller wrote: Johannes Pfau wrote: You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and can be used as a dynamic

Re: Color your terminal's output

2011-10-09 Thread Marco Leise
Am 09.10.2011, 12:32 Uhr, schrieb Jens Mueller jens.k.muel...@gmx.de: Johannes Pfau wrote: Jens Mueller wrote: BTW: you could also use isatty (http://linux.die.net/man/3/isatty) to detect if stdout has been redirected and disable color output in that case. For windows:

Re: Color your terminal's output

2011-10-08 Thread Johannes Pfau
Jens Mueller wrote: Trass3r wrote: You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and can be used as a dynamic library, so I don't think there are license problems.

Re: Color your terminal's output

2011-10-08 Thread Jens Mueller
Nick Sabalausky wrote: Trass3r u...@known.com wrote in message news:op.v2zhq60v3ncmek@enigma... I see. You mean using curses if available and falling back to ISO/IEC 6429. So you think that supporting ISO/IEC 6429 terminals is too limited, aren't you? Well I personally only care about

Re: Color your terminal's output

2011-10-08 Thread Johannes Pfau
Jens Mueller wrote: Trass3r wrote: You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and can be used as a dynamic library, so I don't think there are license problems.

Re: Color your terminal's output

2011-10-08 Thread Johannes Pfau
Jens Mueller wrote: Johannes Pfau wrote: Jens Mueller wrote: Hi, I started writing a simple module to color terminal output some time ago. In a recent thread people seemed interested in having such functionality. I cleaned up this code and kindly ask whether such a module is considered a

Re: Color your terminal's output

2011-10-07 Thread Johannes Pfau
Jens Mueller wrote: Hi, I started writing a simple module to color terminal output some time ago. In a recent thread people seemed interested in having such functionality. I cleaned up this code and kindly ask whether such a module is considered a useful addition. On Posix systems it uses 4

Re: Color your terminal's output

2011-10-07 Thread Trass3r
You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and can be used as a dynamic library, so I don't think there are license problems. However, I'd recommend to load

Re: Color your terminal's output

2011-10-07 Thread Jens Mueller
Trass3r wrote: You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and can be used as a dynamic library, so I don't think there are license problems. However, I'd

Re: Color your terminal's output

2011-10-07 Thread Jens Mueller
Johannes Pfau wrote: Jens Mueller wrote: Hi, I started writing a simple module to color terminal output some time ago. In a recent thread people seemed interested in having such functionality. I cleaned up this code and kindly ask whether such a module is considered a useful addition.

Re: Color your terminal's output

2011-10-07 Thread Trass3r
Am 07.10.2011, 14:51 Uhr, schrieb Jens Mueller jens.k.muel...@gmx.de: Trass3r wrote: You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and can be used as a dynamic

Re: Color your terminal's output

2011-10-07 Thread Jens Mueller
Trass3r wrote: Am 07.10.2011, 14:51 Uhr, schrieb Jens Mueller jens.k.muel...@gmx.de: Trass3r wrote: You could use ANSI codes on posix to avoid a dependency on curses: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors But I think using curses is ok. ncurses is MIT licensed and can be

Re: Color your terminal's output

2011-10-07 Thread Trass3r
I see. You mean using curses if available and falling back to ISO/IEC 6429. So you think that supporting ISO/IEC 6429 terminals is too limited, aren't you? Well I personally only care about bash and Windoze console. I guess these support ISO 6429?!

Re: Color your terminal's output

2011-10-07 Thread Nick Sabalausky
Trass3r u...@known.com wrote in message news:op.v2zhq60v3ncmek@enigma... I see. You mean using curses if available and falling back to ISO/IEC 6429. So you think that supporting ISO/IEC 6429 terminals is too limited, aren't you? Well I personally only care about bash and Windoze console. I

Color your terminal's output

2011-10-06 Thread Jens Mueller
Hi, I started writing a simple module to color terminal output some time ago. In a recent thread people seemed interested in having such functionality. I cleaned up this code and kindly ask whether such a module is considered a useful addition. On Posix systems it uses 4 Curses functions and on