Colorizing wrapper generator for shell commands, with many pre-defined wrappers
License
rrthomas/cw
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
cw
--
(c) 2013-2020 Reuben Thomas <rrt@sc3d.org>
(c) 2004-2010 v9/fakehalo <v9@fakehalo.us>
http://github.com/rrthomas/cw/
cw is a colorer for command-line programs. It is designed to be
transparent: when you type 'du', 'df', 'ping', etc. in your shell the
output is automatically colored according to a definition script, but
when the commands are used non-interactively (e.g. in another script)
their output is not colored, so as not to confuse programs that
process their output. Text patterns are defined as lexical classes,
and assigned colors. The arguments to the original program and OS
under which it is running can be tested. cw includes over 50
definition scripts, and it's easy to write more.
cw is distributed under the GNU General Public License version 3, or, at
your option, any later version. This is free software: you are free to
change and redistribute it. There is NO warranty, to the extent permitted
by law.
Installation
------------
Install cw using LuaRocks from http://www.luarocks.org/ :
luarocks install cw
To use cw, you need to prepend its definition directory to the PATH
environment variable. You should do this in your shell's interactive
startup file (you don't want cw being run by background commands).
For example, for bash and other Bourne-compatible shells, add the
following line to your ~/.bashrc:
if [ -n "$PS1" ]; then PATH=`cw-definitions-path`:$PATH; export PATH; fi
The test of $PS1 ensures that the shell is really interactive.
Use
---
Start a new shell and try some commands, which should now be colored!
See cw(1) (the cw man page) for more information, including details of
definition scripts.
Alternatives to cw
------------------
cw doesn't try to replace some dedicated coloring wrappers and
programs, such as:
ccal: http://unicorn.us.com/cal.html
colorgcc: http://schlueters.de/colorgcc.html
colordiff: http://www.colordiff.org/
colormake: https://github.com/pagekite/Colormake
freecolor: http://www.rkeene.org/oss/freecolor/
There are also other programs like cw that you may prefer:
Crayonizer: https://sites.google.com/site/columscode/home/crayonizer
acoc: http://www.caliban.org/ruby/acoc.shtml
About
Colorizing wrapper generator for shell commands, with many pre-defined wrappers
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published