我可以在处理时保持编译器输出的格式
Can I keep the formatting of the compiler output when handling it?
每当我调用运行GCC时,它都会很好地格式化其输出(使文件名粗体,注意标签白色,错误标签红色等)。但是,当我想重定向并保持显示时,格式就消失了...
示例:
make # The display is formatted
(...)
make |& tee >(xargs echo > example.out) # The display is not formatted
(...)
在保持原始显示格式时如何重定向输出?
文档说( File: gcc-6.info, Node: Diagnostic Message Formatting Options
):
-fdiagnostics-color
[=何时]在诊断中使用颜色。何时
never
,always
或auto
。 默认值取决于编译器的配置方式,可以 在选项时为上述任何一个,或者never
如果GCC_COLORS
环境变量在环境中不存在,auto
否则。auto
意味着仅在标准错误时使用颜色 是终端。
相关文章:
- C++编译器命令 C++ 不会生成输出
- 编译器资源管理器和 GCC 具有不同的输出
- 与其他编译器相比,相同的代码在工作室Microsoft提供不同的输出
- 编译器没有显示错误,但我没有得到任何输出.怎么了?
- Web 编译器输出奇怪的结果
- 构建 C/C++ 代码时的 Gradle 编译器输出
- C 编译器输出由于Permisson误差而未运行
- GCC 8 交叉编译器输出 ARMv7 可执行文件而不是 ARMv6
- 简单构造函数的复杂编译器输出
- 对于此简单功能,为什么编译器输出如此不同
- 我可以在处理时保持编译器输出的格式
- 我正在尝试检查可接受的身高和体重,并让 c++ 编译器输出候选人被拒绝的原因
- 为什么编译器输出以下错误代码:C2143、C2238、C2501
- C++编译器输出
- VC++编译器输出顺序
- Eclipse CDT构建控制台输出不显示整个编译器输出
- 为什么我的 xCode 编译器输出"lldb"?
- 为什么gcc编译器输出pow(10,2)为99而不是100 ?
- 在使用Jam时,我如何看到g++编译器输出?
- "xor eax, ebp" C++编译器输出中使用