Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A bash script to easily traverse directories (github.com/vecrios)
3 points by Vecrios on March 5, 2013 | hide | past | favorite | 3 comments



Note, if you are using Bash, then the $CDPATH variable, already built in to Bash, will let you do everything your script provides.


The CDPATH variable tends to be somewhat ambiguous, to me at least. Appreciate for your comment though!


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".




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: