Fixed up tab completion to be more context-aware