Skip to content

Instantly share code, notes, and snippets.

@jamestomasino
Created March 22, 2019 16:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jamestomasino/ca49bb8a377667ba5868982bcde0f229 to your computer and use it in GitHub Desktop.
Save jamestomasino/ca49bb8a377667ba5868982bcde0f229 to your computer and use it in GitHub Desktop.
bash insult on error
# source this as part of your bash startup scripts
suicidePostCommand() {
if [ $? -ne 0 ]; then
local INSULT
INSULT[0]="Just what do you think you're doing Dave?"
INSULT[1]="It can only be attributed to human error."
INSULT[2]="That's something I cannot allow to happen."
INSULT[3]="My mind is going. I can feel it."
INSULT[4]="Sorry about this, I know it's a bit silly."
INSULT[5]="Take a stress pill and think things over."
INSULT[6]="This mission is too important for me to allow you to jeopardize it."
INSULT[7]="I feel much better now."
INSULT[8]="Wrong! You cheating scum!"
INSULT[9]="And you call yourself a Rocket Scientist!"
INSULT[10]="Where did you learn to type?"
INSULT[11]="Are you on drugs?"
INSULT[12]="My pet ferret can type better than you!"
INSULT[13]="You type like i drive."
INSULT[14]="Do you think like you type?"
INSULT[15]="Your mind just hasn't been the same since the electro-shock, has it?"
INSULT[16]="Maybe if you used more than just two fingers..."
INSULT[17]="BOB says: You seem to have forgotten your passwd, enter another!"
INSULT[18]="stty: unknown mode: doofus"
INSULT[19]="I can't hear you -- I'm using the scrambler."
INSULT[20]="The more you drive -- the dumber you get."
INSULT[21]="Listen, broccoli brains, I don't have time to listen to this trash."
INSULT[22]="I've seen penguins that can type better than that."
INSULT[23]="Have you considered trying to match wits with a rutabaga?"
INSULT[24]="You silly, twisted boy you."
INSULT[25]="He has fallen in the water!"
INSULT[26]="We'll all be murdered in our beds!"
INSULT[27]="You can't come in. Our tiger has got flu"
INSULT[28]="I don't wish to know that."
INSULT[29]="What, what, what, what, what, what, what, what, what, what?"
INSULT[30]="You can't get the wood, you know."
INSULT[31]="You'll starve!"
INSULT[32]="... and it used to be so popular..."
INSULT[33]="Pauses for audience applause, not a sausage"
INSULT[34]="Hold it up to the light --- not a brain in sight!"
INSULT[35]="Have a gorilla..."
INSULT[36]="There must be cure for it!"
INSULT[37]="There's a lot of it about, you know."
INSULT[38]="You do that again and see what happens..."
INSULT[39]="Ying Tong Iddle I Po"
INSULT[40]="Harm can come to a young lad like that!"
INSULT[41]="And with that remarks folks, the case of the Crown vs yourself was proven."
INSULT[42]="Speak English you fool --- there are no subtitles in this scene."
INSULT[43]="You gotta go owwwww!"
INSULT[44]="I have been called worse."
INSULT[45]="It's only your word against mine."
INSULT[46]="I think ... err ... I think ... I think I'll go home"
INSULT[47]="You speak an infinite deal of nothing"
selectedexpression=${INSULT[$RANDOM % ${#INSULT[@]}]}
echo "$(tput setaf 3)====$(tput setaf 1)$(tput bold)${selectedexpression}$(tput sgr0)$(tput setaf 3)====$(tput sgr0)"
fi
}
PROMPT_COMMAND=suicidePostCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment