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

Add operating system type to has() function #729

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

chylex
Copy link
Contributor

@chylex chylex commented Oct 19, 2023

I tried to replicate the logic from https://github.com/vim/vim/blob/0f058d13206665bad37c7d42834cfa0075f50239/src/evalfunc.c#L5511, not 100% sure if I got it right (and some special cases like win32unix are missing) but hopefully it's ok.

@AlexPl292
Copy link
Member

I see there is a pretty hairy set of ifs there, but I think we can have a simplified version. Thank you!

@AlexPl292 AlexPl292 merged commit fb78cdd into JetBrains:master Oct 27, 2023
@chylex
Copy link
Contributor Author

chylex commented Oct 27, 2023

Yea, wasn't sure if there's a better way to write it considering all the quirks of how vim decides which OS features to use, like win32 being included in 64-bit Windows, or how MacOS is based on BSD but isn't supposed to have the bsd feature. I initially considered a switch over OS.CURRENT, but that doesn't include all the options (Solaris).

@chylex chylex deleted the pr/os-types branch October 27, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants