Intelligent prefix detection.

Complete-on-dot function currently abandoned.