summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-03 15:14:46 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-03 15:14:46 +0100
commit4bfa8af14142e54f509048239f4e8596911f56aa (patch)
tree42d136ae2e49c5444802af12493c5c63c5197a28 /runtime
parent42b23fad1d9cdd6266f52d1ed7e0f3f17ce2d04b (diff)
patch 8.0.1455: if $SHELL contains a space then 'shell' is incorrectv8.0.1455
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)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/options.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 75e4f97416..e584b3dbf5 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -6630,14 +6630,21 @@ A jump table for the options with a short description can be found at |Q_op|.
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.,