-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix Windows support for Unix shells and powershell #860
Conversation
My I think when the script generates the content for bat file. Every thing should be forced for MS-Win no matter what VIM setting is. I apologize for my special needs(using unix-shell in MS-Win system). |
That's intended. As long as your shell can run the escaped batchfile and |
@mikelue Can you test the latest commit? |
tempname() is affected by shellslash so expand() is useless. "/c" flag is required to exec a batchfile.
05d5650
to
e5c6dbe
Compare
It works for me with the following settings set shell=sh
set shellcmdflag=-c
set shellquote=
set shellslash
let &shellredir = '>%s 2>&1'
if has('quickfix')
let &shellpipe = '2>&1 | tee'
endif
if v:version >= 704
set shellxescape=
let &shellxquote = (!has('nvim') && has('win32')) ? '"' : ''
endif
@mikelue Do these shell options change the behavior of vim-plug compared to what I have? I copied the bash defaults from Vim's |
User's shell settings do not affect Vim/Neovim jobs.
fc8dffe
to
35cfe4b
Compare
Outputs a list containing the batchfile filepath and the new command to run the batchfile regardless of the user's shell.
@junegunn Can you review the changes? |
Seems it doesn't change the behavior. But I will change my my |
f0eebef
to
9208018
Compare
- fix cmd.exe shellescape for '%' - support pwsh (powershell on Linux)
9208018
to
ebc1690
Compare
|
Does vim-plug need to support trusty? It reached EOL this year. |
cbdbeb3
to
c0e9a30
Compare
c0e9a30
to
c0e21be
Compare
It's nice that we keep things up-to-date, but I wouldn't consider dropping support for older versions of Vim and Linux distros unless there is a good reason, e.g. change required to implement new features, to reduce maintenance burden, etc. |
@janlazo Merged, thanks! I'm grateful for your continuous contributions on Windows support. Would it be easier for you if I make you a collaborator of the project? I'm okay with you fixing/closing Windows related issues without my explicit consent. |
@junegunn Yes, it would be easier. I'm ok with being a collaborator after resolving PRs like #867 for OS support because I don't have a macbook to verify my fixes for macOS. |
Fix #815
Fix (partial) #690
Fix #831
Fix #832 (issue happens on Windows for custom shell settings without this PR)
@mikelue Can you test if it works?
TODO
set noshellslash
, same as cmd.exedo
hook after installing the repo (tested withdo
hook to install the fzf binary)shellredir
must be set to| Out-File -Encoding utf8
fzf#shellescape
uses a different shell default)job_start([executable, arg1, arg2, ...])
and if it's still broken on cmd.exe, similar toterm_start
behavior.