Skip to content
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

Sometimes shell fails with Error while searching for command #7785

Closed
EmilyGraceSeville7cf opened this issue Mar 6, 2021 · 7 comments
Closed

Comments

@EmilyGraceSeville7cf
Copy link
Contributor

EmilyGraceSeville7cf commented Mar 6, 2021

Fish version: 3.1.2
OS: Microsoft Windows [Version 10.0.19042.804]

I use Fish from Cygwin and it often fails with Error while searching for command error:
image

It is frustrating because I prefer Fish instead of Bash but I have to use the second one because it doesn't have the same problem which sometimes happens several times in 5 minutes. On my Mac OS this problem doesn't occur so often.

@faho faho added the cygwin label Mar 6, 2021
@faho faho added this to the fish 3.2.1 milestone Mar 6, 2021
@faho
Copy link
Member

faho commented Mar 6, 2021

Wonderful. It appears access() fails on a file but doesn't specify an error.

@andrew-schulman any ideas? This seems like pretty buggy behavior.

The simple fix is to patch out the error (

fish-shell/src/path.cpp

Lines 108 to 112 in a536ab8

default: {
FLOGF(warning, MISSING_COMMAND_ERR_MSG, next_path.c_str());
wperror(L"access");
break;
}
) or to take the awkward sun special case (where returning 0 is allowed) and extend it to cygwin.

@EmilyGraceSeville7cf
Copy link
Contributor Author

EmilyGraceSeville7cf commented Mar 6, 2021

@faho, Fish may break outside of Cygwin too:
image

@faho
Copy link
Member

faho commented Mar 6, 2021

I'm not entirely sure how that's outside of cygwin?

That seems to still be running in a windows terminal trying to access something called "cygdrive", so it still looks like a cygwin build to me.

@EmilyGraceSeville7cf
Copy link
Contributor Author

Maybe I am wrong. Sorry. :)

@faho faho closed this as completed in 25d85bd Mar 6, 2021
@faho
Copy link
Member

faho commented Mar 6, 2021

Alright, I just removed the error because there isn't anything we can do about this anyway.

I can't see a situation where we get a report about this error appearing and us handling it in any other way than putting it on the pile of conditions to accept. If a new OS appears and it returns EDESPACITO? Well, seems we're ignoring EDESPACITO now.

So the value of the error is non-existent, and it clearly annoys people who see it, so let's just remove it.

@andrew-schulman
Copy link
Contributor

andrew-schulman commented Mar 6, 2021

WFM. Wow you guys are fast, I'm only just reading this and you already fixed it.

FWIW I'm not able to reproduce the error in fish 3.2.0 in Cygwin. @alvinseville7cf in your screenshots I see that fish is looking for functions in odd places like /cygdrive/c/Windows and /cygdrive/c/Python39/scripts. What's the value of $fish_function_path on your host? I have

andrew@helium ~> echo $fish_function_path 
/home/andrex/.config/fish/functions /etc/fish/functions /usr/share/fish/vendor_functions.d /usr/share/fish/functions

and that should be the default unless you've reset it somewhere. Maybe that helps, although it's still better to fix the error.

@EmilyGraceSeville7cf
Copy link
Contributor Author

@andrew-schulman, value of my $fish_function_pat is:

/home/Alvin/.config/fish/functions /etc/fish/functions /usr/share/fish/vendor_functions.d /usr/local/share/fish/vendor_functions.d /usr/share/fish/functions

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants