I should add that this is only available in the local call. Once the call has redispatched to remote site alias, you lose the original alias. In order to avoid that redispatch, declare your command with 'handle-remote-commands' => TRUE,. Again, see ssh command.
Comments
An example is at
An example is at http://api.drush.ws/api/drush/commands!core!ssh.drush.inc/function/drush_ssh_site_ssh/5.x,
$alias = drush_get_context('DRUSH_TARGET_SITE_ALIAS');$site = drush_sitealias_get_record($alias);
thanks a lot, $alias =
thanks a lot,
$alias = drush_get_context('DRUSH_TARGET_SITE_ALIAS');this is what I needed!
cheers
I should add that this is
I should add that this is only available in the local call. Once the call has redispatched to remote site alias, you lose the original alias. In order to avoid that redispatch, declare your command with
'handle-remote-commands' => TRUE,. Again, seesshcommand.