回声输出不同于预期的格式化输出 [英] Echo output is different from expected formatted output
问题描述
我正在使用以下格式进行回显
它应该输出粗体和带下划线的文本,但不是使它变为粗体,而是提供了更明亮"的颜色变体,并带下划线的代码(4)就像青色一样,从而导致浅青色文本./p>
我正在Windows 7 PC上使用Cygwin的Bash.
我发现了一个与我的情况相关的链接,但是我不确定该链接如何应用,因为当我使用Cygwin的解决方案
似乎您是通过旧的cygwin.bat运行bash,因此您将Windows Console用作终端,而不是通过默认的Mintty来运行.高级终端.
默认的Cygwin安装程序在Windows菜单中安装"Cygwin Terminal"条目
菜单项的内容类似于
C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -
具有类似路径
C:\cygwin64\bin
这些项目也可以在cygwin安装程序运行的最后一步重新创建. 有两个框条目:
□在桌面上创建图标
□将图标添加到开始"菜单
如果启用它们,则两者都会重新创建
I'm using the following formatting for echo
It should output text that is both bold and underlined, but instead of making it bold it's giving a 'brighter' variant of color and takes the underlined code (4) as if it was cyan, resulting in Light Cyan text.
I'm using Cygwin's Bash on a windows 7 PC.
Edit: I've found a link that appears relevant to my case but I'm not sure how it applies since they're taking about the windows 10 update bash while I'm using Cygwin's enter link description here
It seems you are running bash through the old cygwin.bat, so you are using the Windows Console as terminal, and not through the default Mintty that is a more advanced Terminal.
By default Cygwin setup install the "Cygwin Terminal" entry in the windows menu
The content of the menu entry is like
C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -
with path like
C:\cygwin64\bin
These items can be a also recreated at the last step of cygwin setup running. There are two box entries :
□ Create icon on Desktop
□ Add icon to Start Menu
If you enable them, both will be recreated
这篇关于回声输出不同于预期的格式化输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!