Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't need symlinks. Just set the CDPATH environment variable!

Also set up case insensitive completion, saves the extra shift press for all those Mac paths.



Does that really not work by default? I would figure it's only an issue if you have your disk formatted as case sensitive, which is usually a bad idea because a lot of devs don't test on it.


No, case-insensitive auto-completion doesn't work by default on OS X. For example, `cd /appli <tab>` does nothing by default (it's not finding `/Applications/`) even though my disk is formatted case-insensitive. However, after adding `set completion-ignore-case on` to my `~/.inputrc` file, I can now type `cd /appli <tab>` and it will auto-complete to `cd /Applications/`.


Any idea why Apple has it set up that way? I don't spend much time in the terminal, but case sensitive auto-complete just doesn't sound helpful.


By default OSX's HFS+ volume is configured to be case-insensitive, but case-preserving. So, the filenames will preserve the case, but the filesystem doesn't distinguish based on case. It makes for interesting bugs.


You sir just changed my life. I never knew about CDPATH..


Case-insensitive auto-completion: brilliant!

To set this up, add `set completion-ignore-case on` to your `~/.inputrc` file (create it if it doesn't exist).


Be careful with CDPATH, it can result in some mind-boggling build script bugs.




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

Search: