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
Rewrite __fish_complete_cd #2289
Conversation
This no longer uses "eval" (which is scary), and is a bit shorter (which is nice).
|
Hmm... I think in this particular case ( |
If "$PWD" is sanitized and trustworthy it should not make any difference I think. |
OSX doesn't have realpath by default This is assuming that $PWD is sanitized, but the worst that could happen is that we print an unnecessary description
If something's a directory and "executable" for us, that should mean we should be able to cd to it.
I personally haven't found any issue with this on OS X, but I only used it in "classic" cases so maybe you should get feedback from other people too. |
I'll be glad to review it (once I'm done with the strings mega-patch!) |
This also fixes a bug where "$HOME" would be replaced with "~" everywhere in the string, so /tmp$HOME/something ($HOME starts with a "/") would become "/tmp~/something".
@ridiculousfish: Ping? I've been using this since I proposed it and haven't stumbled over any more bugs, but I'd rather have someone check it because there could be a ton of edgecases. |
Assigning to myself to remember to review it. |
The merge conflict is because of the sgrep thing, btw. |
@ridiculousfish: Ping? |
Sorry for the delay...I added one more comment. I think it should be good to go after addressing that. |
Squashed rebase merge as 0a99772. I've tried listing all the bugs this fixes or improves, but I'm not sure I caught them all. Thanks for the review! |
This is a sweet fix. Thanks for taking it on! |
This no longer uses "eval" (which is scary), and is a bit shorter (which
is nice).
I'd appreciate testing since there's bound to be a ton of edge-cases.
Sorry for the noise, I'll throw pillows at myself for the appropriate amount of time, as soon as I can figure out how to do that (maybe that's what selfie-sticks are good for?).