Skip to content

Commit

Permalink
Add support for "-Command" flag for powershell
Browse files Browse the repository at this point in the history
Fixes VIM-2622
  • Loading branch information
citizenmatt authored and AlexPl292 committed May 25, 2022
1 parent b7c54d0 commit d7c4e4a
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,11 @@ internal class OptionServiceImpl : OptionService {
override fun getDefaultValue(): VimString {
val shell = (getGlobalOptionValue(OptionConstants.shellName) as VimString).value
return VimString(
if (SystemInfo.isWindows && !shell.contains("sh"))
"/c"
else
"-c"
when {
SystemInfo.isWindows && shell.contains("powershell") -> "-Command"
SystemInfo.isWindows && !shell.contains("sh") -> "/c"
else -> "-c"
}
)
}
},
Expand Down

0 comments on commit d7c4e4a

Please sign in to comment.