This is more complex than that. The completion should complete directories as well out of the box and often does. However, under some circumstances it fails. Not sure what triggers the failure.