Search code examples
bashcygwinecho

Echo output is different from expected formatted output


I'm using the following formatting for echo Screenshot of the terminal appearance

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


Solution

  • 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