Last active
July 7, 2019 00:06
-
-
Save hyuki/3eef0b67e30f2839c1dd556e9f10c9c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For setting color for my prompt. | |
# https://qiita.com/PruneMazui/items/8a023347772620025ad6 | |
# https://gist.github.com/hyuki/3eef0b67e30f2839c1dd556e9f10c9c1 | |
# https://snap.textfile.org/20190706230113/ | |
PROMPT = %Q(export COLOR='%d';) + %q(PS1="[\[\e[38;5;${COLOR}m\]\u@HOSTNAME\[\e[0m\] \w] \\$ ") | |
256.times do |n| | |
s = sprintf(PROMPT, n) | |
printf("\e[38;5;%dm%s\e[m\n", n, s) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment