Skip to content

Commit

Permalink
pref: unify code style for PowerShell commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Jint-lzxy committed Apr 23, 2023
1 parent e2cfef9 commit f2f3c2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/core/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ You're recommended to install PowerShell for better experience.]],
end

local basecmd = "-NoLogo -MTA -ExecutionPolicy RemoteSigned"
local ctrlcmd = "-Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8"
local ctrlcmd = "-Command [console]::InputEncoding = [console]::OutputEncoding = [System.Text.Encoding]::UTF8"
vim.api.nvim_set_option_value("shell", vim.fn.executable("pwsh") and "pwsh" or "powershell", {})
vim.api.nvim_set_option_value("shellcmdflag", string.format("%s %s;", basecmd, ctrlcmd), {})
vim.api.nvim_set_option_value("shellredir", "-RedirectStandardOutput %s -NoNewWindow -Wait", {})
Expand Down

0 comments on commit f2f3c2c

Please sign in to comment.