-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #749 - Use /bin/sh when the shell is fish
- Loading branch information
Showing
2 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Before: | ||
Save &shell | ||
Save &shellcmdflag | ||
|
||
After: | ||
Restore | ||
let g:ale_has_override = {} | ||
|
||
Execute(sh should be used when the shell is fish): | ||
" Set something else, so we will replace that too. | ||
let &shellcmdflag = '-f' | ||
|
||
let &shell = 'fish' | ||
|
||
AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand('foobar') | ||
|
||
let &shell = '/usr/bin/fish' | ||
|
||
AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand('foobar') | ||
|
||
let &shell = '/usr/local/bin/fish' | ||
|
||
AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand('foobar') | ||
|
||
Execute(Other shells should be used when set): | ||
let &shell = '/bin/bash' | ||
let &shellcmdflag = '-c' | ||
|
||
AssertEqual ['/bin/bash', '-c', 'foobar'], ale#job#PrepareCommand('foobar') | ||
|
||
Execute(cmd /c as a string should be used on Windows): | ||
let &shell = 'who cares' | ||
let &shellcmdflag = 'whatever' | ||
|
||
let g:ale_has_override = {'win32': 1} | ||
|
||
AssertEqual 'cmd /c foobar', ale#job#PrepareCommand('foobar') |