@@ -6726,23 +6726,25 @@ A jump table for the options with a short description can be found at |Q_op|.
67266726
67276727 *'shellcmdflag'* *'shcf'*
67286728'shellcmdflag' 'shcf' string (default: "-c";
6729- Win32, when 'shell' does not contain "sh"
6729+ Win32, when 'shell' contains "powershell":
6730+ "-Command", or when it does not contain "sh"
67306731 somewhere: "/c")
67316732 global
67326733 Flag passed to the shell to execute "!" and ":!" commands; e.g.,
6733- "bash.exe -c ls" or "cmd.exe /c dir". For MS-Windows, the default is
6734- set according to the value of 'shell' , to reduce the need to set this
6735- option by the user.
6734+ "bash.exe -c ls", "powershell.exe -Command dir", or "cmd.exe /c dir".
6735+ For MS-Windows, the default is set according to the value of 'shell' ,
6736+ to reduce the need to set this option by the user.
67366737 On Unix it can have more than one flag. Each white space separated
67376738 part is passed as an argument to the shell command.
67386739 See | option-backslash | about including spaces and backslashes.
6739- Also see | dos-shell | for MS-Windows.
6740+ Also see | dos-shell | and | dos-powershell | for MS-Windows.
67406741 This option cannot be set from a | modeline | or in the | sandbox | , for
67416742 security reasons.
67426743
67436744 *'shellpipe'* *'sp'*
6744- 'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee" or
6745- "2>&1| tee")
6745+ 'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee"
6746+ "2>&1| tee", or
6747+ "2>&1 | Out-File -Encoding default")
67466748 global
67476749 {not available when compiled without the | +quickfix |
67486750 feature}
@@ -6752,16 +6754,19 @@ A jump table for the options with a short description can be found at |Q_op|.
67526754 The name of the temporary file can be represented by "%s" if necessary
67536755 (the file name is appended automatically if no %s appears in the value
67546756 of this option).
6755- For the Amiga the default is ">". For MS-Windows the default is
6756- ">%s 2>&1". The output is directly saved in a file and not echoed to
6757- the screen.
6757+ For the Amiga the default is ">". For MS-Windows using powershell the
6758+ default is "2>&1 | Out-File -Encoding default", otherwise the default
6759+ is ">%s 2>&1". The output is directly saved in a file and not echoed
6760+ to the screen.
67586761 For Unix the default is "| tee". The stdout of the compiler is saved
67596762 in a file and echoed to the screen. If the 'shell' option is "csh" or
67606763 "tcsh" after initializations, the default becomes "|& tee". If the
67616764 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
67626765 "bash", "fish", "ash" or "dash" the default becomes "2>&1| tee". This
67636766 means that stderr is also included. Before using the 'shell' option a
67646767 path is removed, thus "/bin/sh" uses "sh".
6768+ For Unix and MS-Windows, when the 'shell' option is "pwsh" the default
6769+ becomes ">%s 2>&1" and the output is not echoed to the screen.
67656770 The initialization of this option is done after reading the ".vimrc"
67666771 and the other initializations, so that when the 'shell' option is set
67676772 there, the 'shellpipe' option changes automatically, unless it was
@@ -6777,23 +6782,21 @@ A jump table for the options with a short description can be found at |Q_op|.
67776782 security reasons.
67786783
67796784 *'shellquote'* *'shq'*
6780- 'shellquote' 'shq' string (default: ""; Win32, when 'shell'
6781- contains "sh" somewhere: "\"")
6785+ 'shellquote' 'shq' string (default: "")
67826786 global
67836787 Quoting character(s), put around the command passed to the shell, for
67846788 the "!" and ":!" commands. The redirection is kept outside of the
67856789 quoting. See 'shellxquote' to include the redirection. It's
67866790 probably not useful to set both options.
67876791 This is an empty string by default. Only known to be useful for
67886792 third-party shells on MS-Windows-like systems, such as the MKS Korn
6789- Shell or bash, where it should be "\"". The default is adjusted
6790- according the value of 'shell' , to reduce the need to set this option
6791- by the user. See | dos-shell | .
6793+ Shell or bash, where it should be "\"". See | dos-shell | .
67926794 This option cannot be set from a | modeline | or in the | sandbox | , for
67936795 security reasons.
67946796
67956797 *'shellredir'* *'srr'*
6796- 'shellredir' 'srr' string (default ">", ">&" or ">%s 2>&1")
6798+ 'shellredir' 'srr' string (default ">", ">&", ">%s 2>&1", or
6799+ "2>&1 | Out-File -Encoding default")
67976800 global
67986801 String to be used to put the output of a filter command in a temporary
67996802 file. See also | :! | . See | option-backslash | about including spaces
@@ -6804,10 +6807,12 @@ A jump table for the options with a short description can be found at |Q_op|.
68046807 The default is ">". For Unix, if the 'shell' option is "csh" or
68056808 "tcsh" during initializations, the default becomes ">&". If the
68066809 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
6807- "bash" or "fish", the default becomes ">%s 2>&1". This means that
6808- stderr is also included. For Win32, the Unix checks are done and
6809- additionally "cmd" is checked for, which makes the default ">%s 2>&1".
6810- Also, the same names with ".exe" appended are checked for.
6810+ "bash", "fish", or "pwsh", the default becomes ">%s 2>&1". This means
6811+ that stderr is also included. For Win32, the Unix checks are done and
6812+ additionally "cmd" is checked for, which makes the default ">%s 2>&1",
6813+ and "powershell" is checked for which makes the default
6814+ "2>&1 | Out-File -Encoding default" (see | dos-powershell | ). Also, the
6815+ same names with ".exe" appended are checked for.
68116816 The initialization of this option is done after reading the ".vimrc"
68126817 and the other initializations, so that when the 'shell' option is set
68136818 there, the 'shellredir' option changes automatically unless it was
@@ -6822,9 +6827,9 @@ A jump table for the options with a short description can be found at |Q_op|.
68226827 global
68236828 {only for MS-Windows}
68246829 When set, a forward slash is used when expanding file names. This is
6825- useful when a Unix-like shell is used instead of cmd.exe. Backward
6826- slashes can still be typed, but they are changed to forward slashes by
6827- Vim.
6830+ useful when a Unix-like shell is used instead of cmd.exe, pwsh.exe, or
6831+ powershell.exe. Backward slashes can still be typed, but they are
6832+ changed to forward slashes by Vim.
68286833 Note that setting or resetting this option has no effect for some
68296834 existing file names, thus this option needs to be set before opening
68306835 any file for best results. This might change in the future.
@@ -6878,6 +6883,8 @@ A jump table for the options with a short description can be found at |Q_op|.
68786883 *'shellxquote'* *'sxq'*
68796884'shellxquote' 'sxq' string (default: "";
68806885 for Win32, when 'shell' is cmd.exe: "("
6886+ for Win32, when 'shell' is
6887+ powershell.exe: "\""
68816888 for Win32, when 'shell' contains "sh"
68826889 somewhere: "\""
68836890 for Unix, when using system(): "\"")
@@ -6890,11 +6897,12 @@ A jump table for the options with a short description can be found at |Q_op|.
68906897 then ')"' is appended.
68916898 When the value is '(' then also see 'shellxescape' .
68926899 This is an empty string by default on most systems, but is known to be
6893- useful for on Win32 version, either for cmd.exe which automatically
6894- strips off the first and last quote on a command, or 3rd-party shells
6895- such as the MKS Korn Shell or bash, where it should be "\"". The
6896- default is adjusted according the value of 'shell' , to reduce the need
6897- to set this option by the user. See | dos-shell | .
6900+ useful for on Win32 version, either for cmd.exe, powershell.exe, or
6901+ pwsh.exe which automatically strips off the first and last quote on a
6902+ command, or 3rd-party shells such as the MKS Korn Shell or bash, where
6903+ it should be "\"". The default is adjusted according the value of
6904+ 'shell' , to reduce the need to set this option by the user. See
6905+ | dos-shell | .
68986906 This option cannot be set from a | modeline | or in the | sandbox | , for
68996907 security reasons.
69006908
0 commit comments