Skip to content

Instantly share code, notes, and snippets.

@thedevelobear
Last active July 25, 2023 13:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thedevelobear/082fb842fbcd2160d77b4961d4f819db to your computer and use it in GitHub Desktop.
Save thedevelobear/082fb842fbcd2160d77b4961d4f819db to your computer and use it in GitHub Desktop.
ZSH Rainbow - a function that turns your username in zsh to a random emoji. Paste it in .zshrc
prompt_context() {
# Custom (Random emoji)
emojis=("⚑️" "πŸ”₯" "πŸ’€" "πŸ‘‘" "😎" "🐸" "🐡" "πŸ¦„" "🌈" "🍻" "πŸš€" "πŸ’‘" "πŸŽ‰" "πŸ”‘" "πŸ‡ΉπŸ‡­" "🚦" "πŸŒ™")
RAND_EMOJI_N=$(( $RANDOM % ${#emojis[@]} + 1))
prompt_segment black default "${emojis[$RAND_EMOJI_N]} "
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment