Skip to content

Instantly share code, notes, and snippets.

@laixintao
Created November 8, 2017 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laixintao/c6663fd23736d130e4efad452d9d408f to your computer and use it in GitHub Desktop.
Save laixintao/c6663fd23736d130e4efad452d9d408f to your computer and use it in GitHub Desktop.
#!/bin/zsh -f
autoload -U colors
colors
print "
ZSH Color definitions:
\e[1mprompt simple\e[0m [\e[1m<\e[0mcolor1\e[1m>\e[0m[\e[1m<\e[0mcolor2\e[1m>\e[0m[\e[1m<\e[0mcolor3\e[1m>\e[0m[\e[1m<\e[0mstring1\e[1m>\e[0m[\e[1m<\e[0mstring2\e[1m>\e[0m[\e[1m<\e[0mstring3\e[1m>\e[0m]]]]]]
Supply up to three \e[1mcolors\e[0m and then up to three alternate static \e[1mprompt strings \e[0m.
\e[1mcolor1\e[0m is the local prompt color: \e[1mzsh-% \e[0m color1=default
\e[1mcolor2\e[0m is the remote prompt color: \e[31m$HOST:r:r-%\e[0m color2=red
\e[1mcolor3\e[0m is the screensession prompt color: \e[1mScreen-% \e[0m color3=default
Allowed \e[1mcolorN\e[0m options include:
\e[1mdefault\e[0m, \e[0m black\e[0m, \e[31m red\e[0m, \e[32m green\e[0m, \e[33m yellow\e[0m, \e[34m blue\e[0m, \e[35m magenta\e[0m, \e[36m cyan\e[0m, \e[0m white\e[0m
\e[1mstringN\e[0m can be any (non-dynamic) text string or prompt special characters (eg: %m)
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment