![]() ![]() That's understandable, I'll close this issue then. How is this function not throwing an error in this case? If some kind of normalization is happening beforehand, then why isn't it already an absolute path? 764 1 1 gold badge 7 7 silver badges 13 13 bronze badges. The returned list should be empty, and yet we throw an error if the returned list is empty. How do I properly integrate MSYS2 shell into my vscode bash shell visual-studio-code msys2 Share. Now if I cd foo, that doesn't match the first two conditions either. Otherwise, we loop through CDPATH, and for each element we add a path to the returned list.įor the purpose of simplicity, let's assume that my CDPATH is empty., we normalize it and add it to the returned list. If the path starts with /, we add it to the returned list.The path_apply_cdpath function returns a list of paths. I'm actually a bit confused at the logic there, tbh. ![]() I don't know what exactly would be involved in fixing that, and tbh I'm not enthused about the idea of adding code here that isn't just specific to windows (which we do not natively support) but specific to some windows compatibility layers when WSL seems to be the way forward and doesn't have this problem (AFAIK - pretty sure they use /mnt/c instead of C:\). ![]() And C:\ is an absolute path, but only on specific windows-y systems. The issue here is, fundamentally, that fish wants an absolute directory for $PWD, so it can do path computations on it. Ideally, this code would only run on Windows builds if possible.Īdding special code that only runs on minority platforms isn't a great idea and should be avoided if at all possible. C:\ is a perfectly allowable unix directory name. That's the ambiguity I complained about above. So if you are in /tmp, it will attempt to cd to /tmp/C:\, which fails because that doesn't exist. The error you are getting is this one, when attempting to cd to all possible $CDPATH components has failed.īecause what happens is that path_apply_cdpath absolutizes the directory, and, like I said, assumes C:\ refers to a directory called C:\ inside one of the directories in $CDPATH. (not sure that error is reachable anymore, tbh) It's a string operation, not a file operation. As the above respondents are describing, you can install and run fish within msys2. That's not the error you're getting, because this doesn't ever check if a directory exists, it only applies $CDPATH. Yes, I also wanted fish to be added to scoop, but then after reading about POSIX etc, it seems as though it is not possible until the fish people compile a native version for Windows. If no directory is found, it throws an error here. It introduces problems if something happens between the check and the actual usage. I think an extra condition needs to be added to end of this function that does a filesystem check to see if the directory exists ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |