Remove other shell parameters from the named directory hash.

This should fix the problem where a completed word becomes "~word".