Mercurial > vim
diff runtime/doc/options.txt @ 13162:51521b8a370c v8.0.1455
patch 8.0.1455: if $SHELL contains a space then 'shell' is incorrect
commit https://github.com/vim/vim/commit/4bfa8af14142e54f509048239f4e8596911f56aa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 3 15:14:46 2018 +0100
patch 8.0.1455: if $SHELL contains a space then 'shell' is incorrect
Problem: If $SHELL contains a space then the default value of 'shell' is
incorrect. (Matthew Horan)
Solution: Escape spaces in $SHELL. (Christian Brabandt, closes #459)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 03 Feb 2018 15:15:05 +0100 |
parents | 53cc7ea77c54 |
children | 167a030448fa |
line wrap: on
line diff
--- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -6630,14 +6630,21 @@ A jump table for the options with a shor It is allowed to give an argument to the command, e.g. "csh -f". See |option-backslash| about including spaces and backslashes. Environment variables are expanded |:set_env|. + If the name of the shell contains a space, you might need to enclose - it in quotes. Example: > + it in quotes or escape the space. Example with quotes: > :set shell=\"c:\program\ files\unix\sh.exe\"\ -f < Note the backslash before each quote (to avoid starting a comment) and each space (to avoid ending the option value). Also note that the "-f" is not inside the quotes, because it is not part of the command - name. And Vim automagically recognizes the backslashes that are path + name. Vim automagically recognizes the backslashes that are path separators. + Example with escaped space (Vim will do this when initializing the + option from $SHELL): > + :set shell=/bin/with\\\ space/sh +< The resulting value of 'shell' is "/bin/with\ space/sh", two + backslashes are consumed by `:set`. + Under MS-Windows, when the executable ends in ".com" it must be included. Thus setting the shell to "command.com" or "4dos.com" works, but "command" and "4dos" do not work for all commands (e.g.,