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

Neovim is not recognized as a unix app #22845

Open
2 of 6 tasks
tunaflsh opened this issue Dec 20, 2024 · 4 comments
Open
2 of 6 tasks

Neovim is not recognized as a unix app #22845

tunaflsh opened this issue Dec 20, 2024 · 4 comments
Labels

Comments

@tunaflsh
Copy link

Description / Steps to reproduce the issue

  1. As such environment variables are automatically converted to Windows style. In particular MANPATH=C:\msys64\mingw64\local\man;... which breaks the man plugin. This results in :Man man reporting "no manual entry for man"
  2. Default values for 'shell', 'shellxquote', 'shellcmdflag' options are incompatible with each other:
shell='C:\msys64\usr\bin\bash.exe'
shellxquote='"'
shellcmdflag='/s /c'  # these are cmd.exe flags
  1. 'shelltemp' is set and an external command :!cmd requires a temp file, the error "E485: Can't read file" occurs.

Expected behavior

  1. MANPATH stays unix style.
  2. Neovim recognizes has('unix') and sets the flags properly
  3. The file can be read.

Actual behavior

See description.

Verification

Windows Version

MINGW64_NT-10.0-26100

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANGARM64

Are you willing to submit a PR?

No response

@tunaflsh tunaflsh added the bug label Dec 20, 2024
@tunaflsh
Copy link
Author

There are workarounds for each case:

  1. export MSYS2_ENV_CONV_EXCL=MANPATH from https://www.msys2.org/docs/filesystem-paths/
  2. and 3. This case is related to #16301. In init.lua (or vimrc):
vim.o.shell = 'bash'       -- or in vimrc:  set shell=bash
vim.o.shellcmdflag = '-c'  --               set shellcmdflag=-c
vim.o.shellxquote = ''     --               set shellxquote=
vim.o.shellquote = ''      --               set shellquote=
vim.o.shelltemp = false    --               set noshelltemp

-- or

vim.o.shell = 'cmd /s /c bash'
vim.o.shellcmdflag = '-c'
vim.o.shellxquote = ''
vim.o.shellquote = ''
vim.o.shelltemp = true

@Kreijstal
Copy link
Contributor

that's because neovim is not a unix app, but a windows one, there is no package neovim, there is mingw-w64-x86_64-neovim, there is vim, which is a msys2/cygwin true unix.

@tunaflsh
Copy link
Author

I was using vim up until now, but decided to switch to neovim for performance benefits. Could there be a cygwin version of neovim?

@Kreijstal
Copy link
Contributor

I was using vim up until now, but decided to switch to neovim for performance benefits. Could there be a cygwin version of neovim?

I accept your PR https://github.com/Kreijstal/msys2-ur, since it will never be accepted on msys2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants