alecmev / cmdcolor Goto Github PK
View Code? Open in Web Editor NEWColorizes standard output on Windows
License: MIT License
Colorizes standard output on Windows
License: MIT License
Perhaps accept arguments, so it can be called like:
cmdcolor \033[31m RED ON DEFAULT
This could be useful from batch scripts.
First experiments show a ~3x reduction in size.
'0'
not being subtracted from the last digit, and not validated afterwards.
The best way to let the user know that something is wrong.
Handle all common signals appropriately.
I'm calling for a .bat file with:
script.bat | cmdcolor.exe
script.bat has the following lines:
@echo off
echo This line should clear out.
cls
echo This line should be only visible.
pause
Executing the script leads to the following:
Any ideas how to fix this and get CLS to clear the screen normally?
It's quite annoying to see cmdcolor.exe has stopped working
every time the other end of the pipe is terminated manually.
Let Visual Studio generate optimal options, and then just copy the commands to the build script.
Currently, building with MSVC creates a dependency on MSVCRT.DLL
(specifically, MSVCP120.DLL
when built with VS2013). This is not necessarily available on all systems.
Changing the /MD
option to /MT
will build statically-linked binaries, which are far more portable. The cost is an increase of file size from ~25 kB to ~400 kB (unpacked).
Reference:
http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
http://stackoverflow.com/a/37402
The GCC build passes -static-libstdc++
, which is not a valid option in TDM-GCC (http://stackoverflow.com/a/19080526). Apparently static linking is the default anyway.
This is probably more TDM-GCC doing something wrong, since this probably shouldn't be reported as an error (aborting compilation).
Possible workarounds in the build script include checking the GCC version or retrying without that option on error. Neither option is particularly nice.
I leave this issue here in case someone else stumbles on the same problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.