Can't enable 256 colors in ConEmu

前端 未结 4 1637
清歌不尽
清歌不尽 2021-01-30 23:21

I\'m trying to get 256 colors in the fantastic ConEmu-Maximus5 console.

Update: Now it only shows 8 colors. I know because \'$tput colors\' output is \'

4条回答
  •  长情又很酷
    2021-01-30 23:56

    local COOLRED="\e[38;5;173m"
    
    local COOLGREEN="\e[38;5;113m"
    

    Those \es are probably from an e.g. C printf string. You don't want them in a shell script. Stick with the original \033 notation. Also you are missing the closing \]. These lines should now read

    local COOLRED="\[\033[38;5;173m\]"
    
    local COOLGREEN="\[\033[38;5;113m\]"
    

提交回复
热议问题