Not sure if this can already be done, but I couldn't find it in the docs. I'm looking to do something like :CtrlP *profile* and have ctrl p show me all filenames that contain profile
edited to be more clear
@jgallen23 you need to use the tag or buffertag extension for ctrlp, it will search files for the word
I actually only want the files with profile in the name of the file (like how ctrlp works currently). I just want to be able to programmatically invoke a search. Sorry for the confusion.
There's the g:ctrlp_default_input option with which you can create a command like this:
com! -n=? CtrlPDefInput let g:ctrlp_default_input = <q-args> | CtrlP
Then just use :CtrlPDefInput profile.
It's an option because allowing :CtrlP search-string while already having :CtrlP path/ can complicate things quite a bit.