-
Notifications
You must be signed in to change notification settings - Fork 3
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
SSH provider: Cannot browse non-Linux hosts (FreeBSD, macOS, etc); invalid stat command flags #209
Comments
Since it looks like it's just a malformed |
I don't "officially" support non-linux/non-windows operating systems. That is mostly because I don't have one laying around to test on. That said, I am more than happy to accept a PR :) Some things you are going to want to look for The actual format flags on providers/ssh.lua:1395 are very specifically laid out. If you need to change the flags used here, feel free for your PR but we will need to review them to ensure they work on Linux based OS's as well. A note (I don't remember if its documented or not), the stat flags are setup as Do not change the last flag in the stat format (I don't remember if the logic is still there, but at one time the stat output parser expected Do not add a space between Lastly, if it proves impossible for Linux and BSD to live together in this provider (IE, you can't just slightly modify the stat flags), there is another route we can take to support BSD. If you check out providers/ssh.lua:189-195, you can see how we differentiate between For that (if we need to go that route), check out providers/ssh:251-327 for reference. We would not use this function but we could create something similar for stat to "other" clients that aren't linux (or maybe that aren't GNU instead?) Feel free to tinker, if you have issues or questions, please ping me :) |
After looking at the error you provided, I am pretty sure we won't be able to "easily" update the stat flags to work with BSD's flavor of stat. So in order to get support for BSD, we are going to need to go the last route I mentioned above (adding If I have time tonight, I will see if I can spin up a BSD vm to play with that a bit, though I would prefer a PR from someone with experience using BSD. |
Thank you. I'll try to do the same, if I have the time. I've never used Thanks for the pointers. Should definitely help. |
I have setup a FreeBSD VM and have tested a bit to figure out how to approach this. I am working through an implementation that extends stat to allow for FreeBSD (and potentially Mac if its needed?). If you are still playing with this, you will want to use the following stat command flags This gets pretty close to what we are out putting with the linux version of stat. The main difference (from what I can tell) is that the 'TYPE' is coming back slightly differently than it does in Linux. I haven't dug too deep into that part of the code but I seem to recall there is quite a bit of data normalization that happens so I am not super worried about that. Really, this means that we just need to put a switch on host connection that checks the host OS and if its |
Good morning,
I love what you're trying to do, and I'm noticing that there is some partial support for non-Linux hosts... when I try to connect with :Neotree remote to the FreeBSD Hosts on my .ssh/config, I see a small FreeBSD Icon appear next to the host name, and nothing else happens.
I've already got passwordless login using public-private key encryption and it works from any standard terminal using SSH or MOSH.
However, no files appear in the Neotree file panel, as opposed to a Linux system:

When I check :NMlogs, I find the following, with an error message regarding the 'stat' command:
Received non-0 exit code while trying to stat ssh://moho/// { error = "stat: illegal option -- cusage: stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file|handle ...]",
see the full log below:
The text was updated successfully, but these errors were encountered: