mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
docs(options): shell-powershell #30969
`-NonInteractive` at least somewhat hints to pwsh/powershell, that shell sessions created from :! are not interactive, though even that is not foolproof, because powershell is weird. `$PSStyle.OutputRendering='plaintext'` causes pwsh/powershell to omit ANSI escape sequences in its output.
This commit is contained in:
@@ -5179,7 +5179,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
*shell-powershell*
|
*shell-powershell*
|
||||||
To use PowerShell: >vim
|
To use PowerShell: >vim
|
||||||
let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
|
let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
|
||||||
let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
|
let &shellcmdflag = '-NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';$PSStyle.OutputRendering=''plaintext'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
|
||||||
let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
|
let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
|
||||||
let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode'
|
let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode'
|
||||||
set shellquote= shellxquote=
|
set shellquote= shellxquote=
|
||||||
|
2
runtime/lua/vim/_meta/options.lua
generated
2
runtime/lua/vim/_meta/options.lua
generated
@@ -5434,7 +5434,7 @@ vim.go.sdf = vim.go.shadafile
|
|||||||
---
|
---
|
||||||
--- ```vim
|
--- ```vim
|
||||||
--- let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
|
--- let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
|
||||||
--- let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
|
--- let &shellcmdflag = '-NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';$PSStyle.OutputRendering=''plaintext'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
|
||||||
--- let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
|
--- let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
|
||||||
--- let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode'
|
--- let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode'
|
||||||
--- set shellquote= shellxquote=
|
--- set shellquote= shellxquote=
|
||||||
|
@@ -7111,7 +7111,7 @@ return {
|
|||||||
*shell-powershell*
|
*shell-powershell*
|
||||||
To use PowerShell: >vim
|
To use PowerShell: >vim
|
||||||
let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
|
let &shell = executable('pwsh') ? 'pwsh' : 'powershell'
|
||||||
let &shellcmdflag = '-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
|
let &shellcmdflag = '-NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';$PSStyle.OutputRendering=''plaintext'';Remove-Alias -Force -ErrorAction SilentlyContinue tee;'
|
||||||
let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
|
let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode'
|
||||||
let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode'
|
let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode'
|
||||||
set shellquote= shellxquote=
|
set shellquote= shellxquote=
|
||||||
|
Reference in New Issue
Block a user