Closed (duplicate)
Project:
Drush
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2008 at 15:02 UTC
Updated:
1 Aug 2008 at 15:12 UTC
If you want the current shell directory (eg: "sites/mysite.com") to define which site will be used by Drush (eg: "mysite.com"), you can use a shell script with this code:
#!/bin/bash
DRUSH='[here the path to Drush]/drush.php'
OPTIONS='-v'
SITE=`expr $PWD : '.*\/sites\/\(.*\)$'`
if [[ $SITE && "$SITE" != "all" && "$SITE" != "default" ]]
then
URI="-l http://$SITE"
fi
php $DRUSH $OPTIONS $URI $@
It would be convenient to have this as default.
Vianney Stroebel
Likwid - Spécialistes Drupal - Paris
Comments
Comment #1
moshe weitzman commented#239524: Make uri argument optional. Please continue the conversation there. This would indeed be a nice feature.