Skip to content

Instantly share code, notes, and snippets.

@mshock
Created April 25, 2015 19:55
Show Gist options
  • Save mshock/c8c6251f8069992279c8 to your computer and use it in GitHub Desktop.
Save mshock/c8c6251f8069992279c8 to your computer and use it in GitHub Desktop.
display Clippy whenever last command doesn't return success
##
## Milk from Milk and Cheese
##
$the_cow = <<EOC;
$thoughts ___
$thoughts / \\
$thoughts / \\
/ \\
___ ___
/___\\ /___\\
\\*__/ \\*__/
| |
| | | |
| | | |
| | | |
| \\ / |
| \\__/ |
\\ /
\\ /
\\____/
EOC
function clippy {
if [[ $? != 0 ]]
then cowsay -f clippy "Would you like any help with that?"
fi;
}
export PROMPT_COMMAND='clippy'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment