Mercurial > vim
comparison runtime/doc/os_dos.txt @ 25068:0ce24f734615 v8.2.3071
patch 8.2.3071: shell options are not set properly for PowerShell
Commit: https://github.com/vim/vim/commit/127950241e84c822d3c50f46a00d42a70d2d5cb6
Author: Mike Williams <mikew@globalgraphics.com>
Date: Mon Jun 28 20:53:58 2021 +0200
patch 8.2.3071: shell options are not set properly for PowerShell
Problem: Shell options are not set properly for PowerShell.
Solution: Use better option defaults. (Mike Willams, closes https://github.com/vim/vim/issues/8459)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 28 Jun 2021 21:00:04 +0200 |
parents | 63beef1ca62c |
children | beff72446e2e |
comparison
equal
deleted
inserted
replaced
25067:7679db2caea6 | 25068:0ce24f734615 |
---|---|
15 5. File formats |dos-file-formats| | 15 5. File formats |dos-file-formats| |
16 6. :cd command |dos-:cd| | 16 6. :cd command |dos-:cd| |
17 7. Interrupting |dos-CTRL-Break| | 17 7. Interrupting |dos-CTRL-Break| |
18 8. Temp files |dos-temp-files| | 18 8. Temp files |dos-temp-files| |
19 9. Shell option default |dos-shell| | 19 9. Shell option default |dos-shell| |
20 10. PowerShell |dos-powershell| | |
20 | 21 |
21 ============================================================================== | 22 ============================================================================== |
22 1. File locations *dos-locations* | 23 1. File locations *dos-locations* |
23 | 24 |
24 If you keep the Vim executable in the directory that contains the help and | 25 If you keep the Vim executable in the directory that contains the help and |
295 <shell> -c "command name" >file | 296 <shell> -c "command name" >file |
296 For Win32 as: | 297 For Win32 as: |
297 <shell> -c "command name >file" | 298 <shell> -c "command name >file" |
298 For DOS 32 bit, DJGPP does this internally somehow. | 299 For DOS 32 bit, DJGPP does this internally somehow. |
299 | 300 |
300 When starting up, Vim checks for the presence of "sh" anywhere in the 'shell' | 301 When starting up, if Vim does not recognise a standard Windows shell it checks |
301 option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or | 302 for the presence of "sh" anywhere in the 'shell' option. If it is present, |
302 'shellxquote' options will be set as described above. | 303 Vim sets the 'shellcmdflag' and 'shellquote' or 'shellxquote' options will be |
304 set as described above. | |
305 | |
306 ============================================================================== | |
307 10. PowerShell *dos-powershell* | |
308 | |
309 Vim also supports Windows PowerShell. If 'shell' has been set to | |
310 "powershell.exe" at startup then VIM sets 'shellcmdflag', 'shellxquote', | |
311 'shellpipe', and 'shellredir' options to the following values: | |
312 | |
313 'shellcmdflag' -Command | |
314 'shellxquote' " | |
315 'shellpipe' 2>&1 | Out-File -Encoding default | |
316 'shellredir' 2>&1 | Out-File -Encoding default | |
317 | |
318 If you find that PowerShell commands are taking a long time to run then try | |
319 setting 'shellcmdflag' to "-NoProfile -Command". Note this will prevent any | |
320 PowerShell environment setup by the profile from taking place. | |
321 | |
322 If you have problems running PowerShell scripts through the 'shell' then try | |
323 setting 'shellcmdflag' to "-ExecutionPolicy RemoteSigned -Command". See | |
324 online Windows documentation for more information on PowerShell Execution | |
325 Policy settings. | |
326 | |
327 The 'shellpipe' and 'shellredir' option values re-encode the UTF-16le output | |
328 from Windows PowerShell to your currently configured console codepage. The | |
329 output can be forced into a different encoding by changing "default" to one of | |
330 the following: | |
331 | |
332 unicode - UTF-16le (default output from PowerShell 5.1) | |
333 bigendianunicode - UTF-16 | |
334 utf8 - UTF-8 | |
335 utf7 - UTF-7 (no-BOM) | |
336 utf32 - UTF-32 | |
337 ascii - 7-bit ASCII character set | |
338 default - System's active code page (typically ANSI) | |
339 oem - System's current OEM code page | |
340 | |
341 Note Multi-byte Unicode encodings include a leading BOM. | |
303 | 342 |
304 vim:tw=78:ts=8:noet:ft=help:norl: | 343 vim:tw=78:ts=8:noet:ft=help:norl: |