Alfred

More Alfred and drush love

A couple years ago I started playing with using the stellar Alfred.app with drush to get things done. This post describes how I used a now defunct URL shortener to create short links from Alfred.

Fast forward a couple of years and Adjix is no longer but the basic script still works. However it had run into a couple of issues like being hard-coded to drush paths which can vary from machine to machine. This was because the non-interactive shell wasn't picking up all the wonderful things like my $PATH definitions in settings files. So a bit of work later and this script now looks like this:

#!/bin/bash
source ~/.bashrc
echo `drush .env ev 'print (shorten_url("{query}"));'`

That's it. Well there are two outputs of the workflow. The first copies the results of the statement to the clipboard. The other posts it to Notification Center so you know the work is done and get to see the URL for your shortened link.

Create custom Adjix short URLs with Alfred

Alfred.app Logo Although I use it all the time it turns I haven't written here about Adjix. There is in some issues but nothing that spells out just how awesome it is. The short version is Adjix is hands down the single best URL shortener out there. While it deserves it's own post suffice it to say you can use its power and still . Future proofing at its best.

But this post isn't about that. It's about using your own custom domain and setting up a URL shortener that works from . Alfred is itself another awesome tool that deserves yet another post. Inspired by a on Dirt Don I set out to create a url shortening shortcut. (Recursion is encouraged).

So based on this post I setup a quick shell script shortcut in Alfred. The properties end up looking something like this:

Subscribe to Alfred