英文:
Why is my rust shell output littered with format characters?
问题
当我使用 Rust 命令 rustup
或 cargo
时,我的输出中充满了似乎是输出格式标记字符的内容:$<2>
我在 zsh
上使用 iterm2,系统信息如下:
Darwin kevs-mbp-3.lan 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64
为什么会出现这种情况?
更新:
% echo $TERM
vt100
% echo $COLORTERM
truecolor
英文:
When I use rust commands rustup
or cargo
my output is littered with what appear to be output format markup characters: $<2>
$<2>info: $<2>syncing channel updates for 'stable-x86_64-apple-darwin'
$<2>info: $<2>latest update on 2023-02-09, rust version 1.67.1 (d5a82bbd2 2023-02-07)
$<2>info: $<2>downloading component 'cargo'
$<2>info: $<2>downloading component 'clippy'
$<2>info: $<2>downloading component 'rust-docs'
19.4 MiB / 19.4 MiB (100 %) 8.8 MiB/s in 2s ETA: 0s
$<2>info: $<2>downloading component 'rust-std'
27.9 MiB / 27.9 MiB (100 %) 9.1 MiB/s in 3s ETA: 0s
$<2>info: $<2>downloading component 'rustc'
56.6 MiB / 56.6 MiB (100 %) 9.5 MiB/s in 6s ETA: 0s
$<2>info: $<2>downloading component 'rustfmt'
$<2>info: $<2>installing component 'cargo'
$<2>info: $<2>installing component 'clippy'
$<2>info: $<2>installing component 'rust-docs'
19.4 MiB / 19.4 MiB (100 %) 3.7 MiB/s in 3s ETA: 0s
$<2>info: $<2>installing component 'rust-std'
27.9 MiB / 27.9 MiB (100 %) 14.4 MiB/s in 1s ETA: 0s
$<2>info: $<2>installing component 'rustc'
56.6 MiB / 56.6 MiB (100 %) 17.4 MiB/s in
I am on zsh
on iterm2
on
Darwin kevs-mbp-3.lan 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64
Why ?
Update:
% echo $TERM
vt100
% echo $COLORTERM
truecolor
答案1
得分: 2
通过将仿真模式从xterm-256color
更改为vt100
,我成功复制了这个问题。
在iterm2中,在首选项 > 配置文件 > 终端下,将报告终端类型从vt100
更新为xterm-256color
。您需要打开一个新的终端才能使此更改生效。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论