Skip to content

Instantly share code, notes, and snippets.

@ukstudio
Created April 11, 2017 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ukstudio/d12c60e63a7e88a4512a78ad3d4ffabf to your computer and use it in GitHub Desktop.
Save ukstudio/d12c60e63a7e88a4512a78ad3d4ffabf to your computer and use it in GitHub Desktop.
wrapper function
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