mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 05:22:31 +08:00
Clean up the new g:ale_shell code. Use it for Windows
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
Before:
|
||||
Save &shell
|
||||
Save &shellcmdflag
|
||||
Save g:ale_shell
|
||||
Save g:ale_shell_arguments
|
||||
|
||||
unlet! g:ale_shell
|
||||
unlet! g:ale_shell_arguments
|
||||
|
||||
After:
|
||||
Restore
|
||||
let g:ale_shell = v:null
|
||||
|
||||
Execute(sh should be used when the shell is fish):
|
||||
if !has('win32')
|
||||
@@ -58,8 +62,10 @@ Execute(cmd /s/c as a string should be used on Windows):
|
||||
endif
|
||||
|
||||
Execute(Setting ale_shell should cause ale#job#PrepareCommand to use set shell):
|
||||
if !has('win32')
|
||||
let g:ale_shell = '/foo/bar'
|
||||
let g:ale_shell = '/foo/bar'
|
||||
|
||||
AssertEqual ['/foo/bar', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar")
|
||||
endif
|
||||
AssertEqual ['/foo/bar', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar")
|
||||
|
||||
let g:ale_shell_arguments = '-x'
|
||||
|
||||
AssertEqual ['/foo/bar', '-x', 'foobar'], ale#job#PrepareCommand(bufnr(''), "foobar")
|
||||
|
||||
Reference in New Issue
Block a user