Awhile vs A While

Today while writing an email, I used the word "awhile" and then realized I wasn't sure if I should be using "awhile" or "a while". So, as I always do, I quickly looked up the definition for "awhile" in the dictionary on my Mac (which, using Quicksilver, is as easy as Cmd+Space -> "dic" -> Enter). I was very surprised to see this definition:

awhile: for a short time

I've always thought, and used, both "awhile" and "a while" to mean a period of time longer than a short time. So then I checked Google's definitions:

awhile: for a short time
a while: a period of indeterminate length (usually short)

Wow, still very confusing! I dug a little further on Google, searching for a good rule that would help me remember which to use while writing. I think I finally found one:

awhile always means "for a while"
a while usually means "for a length of time", and is sometimes accompanied by a preposition, such as "I left work a while ago". You can also add adjectives to further describe the amount of time implied, such as "Its been a long while" or "Please wait for a short while".

Now whenever I need to determine if using "awhile" makes sense, I can simply replace it with "for a while" and see if the sentence still sounds right. For example, "I left work awhile ago" would mean "I left work for a while ago", which is of course wrong. I use a similar rule to remember when to use "it's" and "its"; the former always translates into "it is".