How can I print to the terminal in color? I have set CLICOLOR=1 so commands like ls display their output in color. How can I do this in my own command-line program?
How can I print to the terminal in color? I have set CLICOLOR=1 so commands like ls display their output in color. How can I do this in my own command-line program?
How can I print to the terminal in color? I have set CLICOLOR=1 so commands like ls display their output in color. How can I do this in my own command-line program?
I'm almost certain vi uses the ncurses library. As far as ls -G is concerned I don't know, it may be a bash/shell environment thing. ncurses isn't that hard to pick up - I had to use it for a lab assignment back in college for a Game of Life simulator. ncurses also has the ability to give menus and what not (think pine, putty, vi, etc) so it's not just line output, it's really a basic "windowing" system for the terminal.