Skip to content

Instantly share code, notes, and snippets.

@dkowis
Last active Jun 25, 2018
Embed
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
end
set _lastdir $_dir
set _dir (realpath "$_dir/..")
end
echo "No `gradlew` script found..."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment