Created
February 27, 2019 11:57
-
-
Save nkzsdy/9db8a086c051d72622260b90fa3ee2d7 to your computer and use it in GitHub Desktop.
Rakeタスクをインタラクティブに選択できるfish function
This file contains 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 raket | |
if test -f Gemfile -o -f .bundle/ | |
set task (bundle exec rake -T | peco | cut -d " " -f 2) | |
if [ -n "$task" ] | |
bundle exec rake $task | |
else | |
echo "Task execution was interrupted." | |
end | |
else | |
echo "[ERROR]: $pwd maybe not Rails directory." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment