Created
January 3, 2022 16:18
-
-
Save taiar/a89b73b651430eb721331b863ad2afe5 to your computer and use it in GitHub Desktop.
ZSH Random color name
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
#!/usr/bin/env zsh | |
declare -a colors | |
colors=( | |
"red" | |
"purple" | |
"yellow" | |
"blue" | |
"cyan" | |
"black" | |
"green" | |
) | |
declare -r colors | |
echo ${colors[$(( $RANDOM % ${#colors[@]} + 1 ))]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment