Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make install colors not always shown (gnolang#2179)
In my terminals (konsole, kmscon, kmscon+tmux), colors won't show without -e in `echo -e "\033[0;32m blabla \033[0m"`. The -e option enables interpretation of backslash escapes in the string, which allows the color code `\033[0;32m` to work. With -e it should be more widely supported across different platforms and shell environments. ``` $ help echo echo: echo [-neE] [arg ...] Write arguments to the standard output. Display the ARGs, separated by a single space character and followed by a newline, on the standard output. Options: -n do not append a newline -e enable interpretation of the following backslash escapes -E explicitly suppress interpretation of backslash escapes `echo' interprets the following backslash-escaped characters: \a alert (bell) \b backspace \c suppress further output \e escape character \E escape character \f form feed \n new line \r carriage return \t horizontal tab \v vertical tab \\ backslash \0nnn the character whose ASCII code is NNN (octal). NNN can be 0 to 3 octal digits ``` An alternative is to directly input the escape character, or to use printf: `printf "\033[0;32mHello\033[0m\n"`. @leohhhh does it still work on your machine with `echo -e`? (what terminal are you using btw?) --------- Co-authored-by: grepsuzette <grepsuzette@users.noreply.github.com> Co-authored-by: Morgan Bazalgette <morgan@morganbaz.com>
- Loading branch information