Disable/reset xterm 中的粗体
Disable/reset bold in xterm
用转义序列 "3[21m"
用来 reset/remove bold/bright:
echo -e "Text3[1mMore text3[21mEnd"
必须return:
正文更多正文完
但我明白了
文字更多文字E̲n̲d̲
如您所见,在xterm
"3[21m"
中更改下划线和重新设置粗体我们需要使用"3[0m"
,这是为什么?
有没有办法改变这种行为? (也许用一些参数启动 xterm)
根据XTerm Control Sequences,SGR 21 是"doubly-underlined":
CSI Pm m Character Attributes (SGR).
Ps = 2 1 -> Doubly-underlined (ISO 6429).
Ps = 2 2 -> Normal (neither bold nor faint).
Ps = 2 3 -> Not italicized (ISO 6429).
Ps = 2 4 -> Not underlined.
Ps = 2 5 -> Steady (not blinking).
Ps = 2 7 -> Positive (not inverse).
Ps = 2 8 -> Visible, i.e., not hidden (VT300).
Ps = 2 9 -> Not crossed-out (ISO 6429).
也许你想要 SGR 22。
双下划线功能已在 xterm 中实现 patch #305:
minor reorganization to implement “filler” SGR features. There are no established applications which rely upon these; some people find them amusing.
separate bits used to manage drawing state from attribute-bits.
implement SGR codes 2, 3, 9, 21 and their corresponding resets.
add configure option --disable-wide-attrs
to disable the feature.
用转义序列 "3[21m"
用来 reset/remove bold/bright:
echo -e "Text3[1mMore text3[21mEnd"
必须return:
正文更多正文完
但我明白了
文字更多文字E̲n̲d̲
如您所见,在xterm
"3[21m"
中更改下划线和重新设置粗体我们需要使用"3[0m"
,这是为什么?
有没有办法改变这种行为? (也许用一些参数启动 xterm)
根据XTerm Control Sequences,SGR 21 是"doubly-underlined":
CSI Pm m Character Attributes (SGR).
Ps = 2 1 -> Doubly-underlined (ISO 6429).
Ps = 2 2 -> Normal (neither bold nor faint).
Ps = 2 3 -> Not italicized (ISO 6429).
Ps = 2 4 -> Not underlined.
Ps = 2 5 -> Steady (not blinking).
Ps = 2 7 -> Positive (not inverse).
Ps = 2 8 -> Visible, i.e., not hidden (VT300).
Ps = 2 9 -> Not crossed-out (ISO 6429).
也许你想要 SGR 22。
双下划线功能已在 xterm 中实现 patch #305:
minor reorganization to implement “filler” SGR features. There are no established applications which rely upon these; some people find them amusing.
separate bits used to manage drawing state from attribute-bits. implement SGR codes 2, 3, 9, 21 and their corresponding resets. add configure option --disable-wide-attrs
to disable the feature.