Skip to content

Instantly share code, notes, and snippets.

@sumpygump sumpygump/maybe-git
Created Feb 26, 2016

Embed
What would you like to do?
Maybe Git
#!/bin/bash
# Maybe Git
# INSTALLATION
# 1. Move this file into your ~/bin directory
# mv ./maybe-git ~/bin
# 2. Then run the following command:
# alias git='~/bin/maybe-git'
GIT=`which git`
chance=$RANDOM
let "chance %= 10"
# A 1 in 10 chance that the command will yield "Your Mom" instead of the
# desired command
if [ "$chance" = "3" ]; then
echo $'__ __ __ __ '
echo $'\ \ / /__ _ _ _ __ | \/ | ___ _ __ ___ '
echo $' \ V / _ \| | | | \'__| | |\/| |/ _ \| \'_ ` _ \ '
echo $' | | (_) | |_| | | | | | | (_) | | | | | |'
echo $' |_|\___/ \__,_|_| |_| |_|\___/|_| |_| |_|'
else
$GIT $@
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.