Improve matching to generate autocomplete list. (fixes #75)