This script appends --color
/ -c
option for echo
.
- Source
color_echo.zsh
. - Use as
color_echo --color red "string"
etc.
color_echo [-c color_name] [-n] "[string]"
color_echo [--color color_name] [-n] "[string]"
In your .zshrc
etc.
- Add load path to
fpath
asfpath+=(path/to/color_echo)
. - Load with autoload as
autoload -Uz color_echo
.
Only -c
or --color
(long form of -c
option) additional option for echo
command is available.
Following color name could be specified for this option.
- Normal
black
red
green
yellow
blue
magenta
cyan
white
- Bold
black_bold
red_bold
green_bold
yellow_bold
blue_bold
magenta_bold
cyan_bold
white_bold
Show a b c d e
with red color.
color_echo -c red 'a b c d e'
Show the result of ls
with green color.
color_echo -c green "$(ls)"
"string" part must be given as one string.
For example, color_echo --color red "$(ls)"
.
This project is distributed under MIT License. See LICENSE
.