Add general auto complete function.