2 个不稳定版本
0.2.0 | 2023年7月22日 |
---|---|
0.1.0 | 2022年2月1日 |
#22 在 #tee
6KB
55 代码行
ctee
Rust 实现的 Unix
tee
命令,带有 ANSI 颜色剥离功能。
安装
使用在 crates.io 上发布的包
cargo install --locked ctee
或者手动克隆并安装最新版本
git clone https://github.com/Lipen/ctee
cd ctee
cargo install --path .
用法
$ ctee --help
Read from STDIN and write to STDOUT (unchanged) and FILES (without ANSI-colors)
USAGE:
ctee [OPTIONS] [FILES]...
ARGS:
<FILES>... Output files
OPTIONS:
-a, --append Append to the given files instead of overwriting
--bs <BUFFER_SIZE> Buffer size [default: 8192]
-h, --help Print help information
--strip-ansi <STRIP_ANSI> Strip ANSI color codes when writing to files [default: true]
-V, --version Print version information
EXAMPLES:
<command-with-colorized-output> | ctee my.log
致谢
依赖项
~3.5MB
~64K SLoC