Created
April 11, 2017 10:54
-
-
Save ukstudio/d12c60e63a7e88a4512a78ad3d4ffabf to your computer and use it in GitHub Desktop.
wrapper function
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 rails | |
docker-compose config --services >/dev/null ^/dev/null | |
switch $status | |
case 0 | |
docker-compose exec app rails $argv | |
case '*' | |
if test -d bin | |
bin/rails $argv | |
else | |
set -l rails_cmd (which rails) | |
eval "$rails_cmd $argv" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment