On 2022-05-21, Kato wrote:
> @ Gary (sorry, I don't know how to reply well to vim-ml)
No problem. I don't know how to reply properly to both the list and
the forum from the list, either, so I reply to both and live with
the duplicate messages in the list.
> Thanks for pointing that out.
> WSL users sometimes use Vim in conjunction with Windows. For example,
> clipboard
> integration. At this time, users are aware that Vim is running on WSL.
> For this reason, I believe it would be beneficial to users to provide a way to
> distinguish wsl as well as has('unix'), has('mac'), and has('win64'), even
> though WSL is Linux.
> Also, has('wsl') is implemented in neovim. Of course, Vim and Neovim are
> different projects, and there is no need to adapt Vim to Neovim's
> specifications. However, I believe it would be beneficial to be able to
> identify wsl in a similar API.
I agree that it would be beneficial for a user to be able to
identify the current operating environment, but that is not the
purpose of has(). The purpose of has() is to allow the user to
determine whether a feature is supported. There is no feature that
Vim has to support that I know of other than a Unix/POSIX
environment to build or run on WSL.
When has() reports that Vim has 'unix', 'mac' or 'win64', it is
telling the user how Vim was built, not what the current operating
environment is.
You could as well use has() to report whether Vim is running on
Debian or Ubuntu or Red Hat or Fedora or CentOS. That may be good
to know, but those are not features and it is not the purpose of
has() to report their existence.
It was a mistake for neovim to hijack has() for that purpose. Vim
should not repeat that mistake.
If a user needs to determine the flavor of Unix being used, there
are already mechanisms to determine that, such as $OSTYPE, uname and
/proc/version.
Regards,
Gary
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220522080039.GC2386%40phoenix.