Last active
July 28, 2017 15:54
-
-
Save KellerFuchs/f7c13b20df5ec833b7e960446bb75fa8 to your computer and use it in GitHub Desktop.
BIGSQUEAKERBOX Bash prompt
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
_hostname=( bigsqueakerbox compooter lightningtrappedinpoisonedglass ) | |
_user_1=( loud soft big smol kyuuuut ) | |
_user_2=( shekken shekkie squeak ) | |
sample() { | |
local n=$((RANDOM % $# +1)) | |
echo "${!n}" | |
} | |
prompt() { | |
BORING_PS1="$(sample ${_user_1[@]})$(sample ${_user_2[@]})@$(sample ${_hostname[@]})" | |
PS1= | |
for ((i=0; i < ${#BORING_PS1}; ++i)); do | |
PS1+="\[\033[38;5;$((RANDOM & 255))m\]${BORING_PS1:$i:1}" | |
done | |
} | |
export PROMPT_COMMAND=prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment