Instantly share code, notes, and snippets.

@davidhemphill /alias.zsh Secret
Last active Aug 3, 2017

Embed
What would you like to do?
alias phpunit='function __phpunit() {
OUTPUT="$(blink1-tool --list)"
EXPECTED="no blink(1) devices found"
if [ "$OUTPUT" = "$EXPECTED" ]
then
phpunit "$@"
else
blink1-tool --blue && phpunit "$@" && blink1-tool --green && afplay ~/Music/godlike.mp3 || blink1-tool --red
fi
}; __phpunit'
alias phpunit='function __phpunit() {
OUTPUT="$(blink1-tool --list)"
EXPECTED="no blink(1) devices found"
if [ "$OUTPUT" = "$EXPECTED" ]
then
phpunit "$@"
else
blink1-tool --blue && phpunit "$@" && blink1-tool --green || blink1-tool --red
fi
}; __phpunit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment