Scott Hadfield: Hooking into Drush and Aegir
(Disclaimer: I'm still just learning this stuff, so please let me know if you notice anything wrong in here)
If you build and maintain Drupal sites and haven't used Drush yet, it's time you take a look at it. Even if you only use it for very basic things such as downloading and updating modules it can still be a big time saver.
One of the things that makes Drush so powerful is it's flexibility with hooks. Each Drush command can be hooked in at three different levels; before, during, and after it runs. The hooks are pre, validate, and post, respectively. It works slightly differently than the Drupal hook system but the concept is the same.
In order to hook into a Drush command you need to create your own command file (i.e.: example.drush.inc). In a command file you can create your own commands or hook into existing ones. For this post I'm only going to talk about hooking into existing ones but the Drush documentation has examples of creating your own (thanks to Adrian for helping me out with this stuff! And happy birthday too!).
- سَجل الدخـول لإرسَــال تـَعلـيق.
- Feed: drupal.org aggregator
- اقراءالمصدر
مـواضـيـع ذات صـلـة
- Development Seed: Drush 3.0: More Powerful, Flexible, and Magical
- Lullabot: New features in Drush 3
- Greg Holsclaw: Hook on Drush for Windows
- Lullabot: New features in Drush 3
- Dale McGladdery: Drupal Command Line Scripts with Drush
- Mediacurrent: Learning How to Install Drush on a Non-Admin Rights Server

