Share autocompletion code