Shorten file path in prompt as the user types.

See commit message on 23c9f61 for details.