Update completion function to take expected as argument and possible signal a false match.