News for hackers. Stuff that matters.
Re:ANSI escape codes (2019) by JNRowe on Wednesday February 03, 2021 @02:28PM (#26018002)
This is one of the many cool things that zsh comes with out of the box. It ships an autoload-able colors¹ script that does largely the same thing as your fragment, but you know it available wherever zsh is.

In much the same way it comes with both a termcap² and terminfo³ module, allowing you to easily avoid hardcoding system specific escapes in to your config.

¹ https://github.com/zsh-users/zsh/blob/master/Functions/Misc/...

² http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-...

³ http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-...

There are no comments on this comment yet.