Create a gist now

Instantly share code, notes, and snippets.

@zviryatko /bashrc
Last active Dec 29, 2015

What would you like to do?
Allow drush to run above the drupal root directory
function drush {
DRUSH=$(which drush)
PWD=$(pwd)
if [ -f 'drush/drushrc.php' ];
then
$DRUSH -c ./drush/drushrc.php "$@";
elif [ -d "$PWD/web" ];
then
$DRUSH --root="$PWD/web" "$@";
else
$DRUSH "$@";
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment