Likely it's already possible to pass a completion function to a new command, but it should be documented.