Skip to content

Comment on Show HN: A bash script to easily traverse directoriesparent

Comments

The trick is you have to set it one level up from where you want the expansions to appear. So to allow "cd Downloads" to find /home/user/Downloads, you need to set CDPATH to /home/user

Now all directorys in /home/user/* become match points for "cd dirname".

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.