fish-shell / fish-shell Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDPATH should implicitly include $PWD/"." #4484
Comments
I dunno if this will help, but here's the result of the set command.
|
The issue here is that, unlike bash, fish doesn't include "." implicitly in CDPATH - if you set it, only those directories will be used. That's probably not the right way to do it, and should be changed. We could either append or prepend it. Appending is what bash does, and has the advantage of being backwards-compatible - no currently working My $CDPATH setting is also why I erroneously added 1af38d6, which makes the completions behave as if "." was implicitly prepended. Does anyone have any preferences? |
Note that currently, explicitly adding "." to $CDPATH will work around it. E.g. set -x CDPATH /Users/david/mydirs/ . |
Thank you so much! I couldn't imagine why no one else was having this problem. As far as I'm concerned it doesn't have to be changed at all as long as it is documented that you always want to have . in your CDPATH. |
Well... if you always want to have it, then why not include it? If there's no reason not to include it, then allowing you not to is allowing you to shoot yourself in the foot for no reason. And, as I said, even bash doesn't allow you to not have it (at least as far as I can see). |
Hmm. Maybe add it if it's not already somewhere in the list. If you allow the user to specify it then they can decide whether to prepend or append. |
macOS Sierra/iterm
For testing purposes, I moved my fish directory elsewhere. If I set CDPATH to ~/mydirs, then if I am in my home dir, attempting to cd to any subdir fails. Note that ~/mydirs is empty at this point.
This terminal listing shows the issue.
If I unset CDPATH, I can cd to subdirs of $HOME again.
I thought it might be something I did, but I removed my .config/fish directory and it still happens.
The text was updated successfully, but these errors were encountered: