Skip to content

Instantly share code, notes, and snippets.

Last active Jun 25, 2018
What would you like to do?
gradlew search function for fish shell
function gradlew
set _dir (pwd)
set _lastdir
# need to break when we reach root, or some other known parent.
# Don't skip the first time through.
while test -z $_lastdir; or test (realpath $_dir) != (realpath $_lastdir)
set _cmd "$_dir/gradlew"
if test -e "$_cmd"
eval "$_cmd" "$argv"
return $status
set _lastdir $_dir
set _dir (realpath "$_dir/..")
echo "No `gradlew` script found..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment