Going directly to a module's project page from the command line
Seems like I spend at least 20 minutes everyday typing out URLs to drupal.org project pages. With 6,750+ modules (and counting...), I often have to assess a new module I come across or refresh myself on the details of a certain module in use. Wouldn't it be nice to have a little hack to make this quicker? I'm usually on the command line when needing this info, so why not a command line hack?
I'm using Google Chrome, so I did the below using the google-chrome command, but if you wanted it would work just as well using a firefox command. I tried an alias first, but you can't pass input to an alias (at least from the Bash shell). Ok, so first we create a shell script with a new unused name for our command, you can do this anywhere, but if you want it to be in your path without needing to add it, then put it in /usr/bin/. I like using "dp" as the name of the command, but you could make it whatever you want (e.g, dp for drupal-project or drupal or whatever).
- vim /usr/bin/dp (*Note: You can use any text editor, such as gedit, I just usually use vim)
- Enter the text:
- chmod +x /usr/bin/dp
- chmod 755 /usr/bin/dp
That's it! Now from the command line you can try it out:
Voila. A fresh new tab taking me straight to the project page of the SaveToFTP module (that's my module by the way).
Have fun with the command line