Skip to content

Instantly share code, notes, and snippets.

@renebakx
Last active September 29, 2017 10:17
Show Gist options
  • Save renebakx/9b10215c23c7e5cba20511ee11f257b0 to your computer and use it in GitHub Desktop.
Save renebakx/9b10215c23c7e5cba20511ee11f257b0 to your computer and use it in GitHub Desktop.
switching between project Drush and Drupal, and the global installed
# These two functions asume your are in de public folder of a D8 project
# Run drupal from project when possible
function dpl() {
if [ -f "../vendor/bin/drupal" ]
then
../vendor/bin/drupal "$@";
else
drupal "$@";
fi
}
# Run drush from project when possible
function drs() {
if [ -f "../vendor/bin/drush" ]
then
../vendor/bin/drush "$@";
else
drush "$@";
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment