Last active
June 25, 2018 16:35
-
-
Save dkowis/cf2c027de6cee91d5e4324d2ff65f36d to your computer and use it in GitHub Desktop.
gradlew search function for fish shell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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