A tab completion script that works for Bash. Relies on the BSD md5
command on Mac and md5sum
on Linux, so as long as you have one of those two commands, this should work.
$ gradle [TAB]
#!/bin/bash | |
# Auto format changed java files using google-java-format. | |
# To install, copy this file into $repo/.git/hooks and remove the .sh extension. | |
# Download the google-java-format JAR from | |
# https://github.com/google/google-java-format | |
# A more mature implementation of this would be a plugin for Yelp's pre-commit library: | |
# http://pre-commit.com/ | |
echo "Running auto-formatter for any changed Java files" | |
echo "(formatting changes will be automatically added to your commit)" |
#!/bin/sh | |
# this hook is in SCM so that it can be shared | |
# to install it, create a symbolic link in the projects .git/hooks folder | |
# | |
# i.e. - from the .git/hooks directory, run | |
# $ ln -s ../../git-hooks/pre-commit.sh pre-commit | |
# | |
# to skip the tests, run with the --no-verify argument | |
# i.e. - $ 'git commit --no-verify' |