aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-08-09 07:05:33 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-08-09 07:21:59 +0800
commite01ccda1bebf2d420d725478b480740ff45ad6ad (patch)
tree1b2733ebccb2339ee5e5df27658a9adf44f9c43e /src/nvim/eval.lua
parent336ab2682e08b95c51b8cbafcf9697b5a42026d1 (diff)
downloadrneovim-e01ccda1bebf2d420d725478b480740ff45ad6ad.tar.gz
rneovim-e01ccda1bebf2d420d725478b480740ff45ad6ad.tar.bz2
rneovim-e01ccda1bebf2d420d725478b480740ff45ad6ad.zip
vim-patch:0cc5dce: runtime(doc): clarify directory of Vim's executable vs CWD
According to :h win32-PATH, "the same directory as Vim" means the same directory as the Vim executable, not Vim's current directory. In patch 8.2.4860 these two concepts were mixed up. closes: vim/vim#15451 https://github.com/vim/vim/commit/0cc5dce5780d39fe621f6146d4fb862318918125
Diffstat (limited to 'src/nvim/eval.lua')
-rw-r--r--src/nvim/eval.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 0a003f3b84..825931938e 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -2059,8 +2059,10 @@ M.funcs = {
This function checks if an executable with the name {expr}
exists. {expr} must be the name of the program without any
arguments.
+
executable() uses the value of $PATH and/or the normal
- searchpath for programs. *PATHEXT*
+ searchpath for programs.
+ *PATHEXT*
On MS-Windows the ".exe", ".bat", etc. can optionally be
included. Then the extensions in $PATHEXT are tried. Thus if
"foo.exe" does not exist, "foo.exe.bat" can be found. If
@@ -2070,8 +2072,13 @@ M.funcs = {
then the name is also tried without adding an extension.
On MS-Windows it only checks if the file exists and is not a
directory, not if it's really executable.
- On Windows an executable in the same directory as Vim is
- always found (it is added to $PATH at |startup|).
+ On MS-Windows an executable in the same directory as the Vim
+ executable is always found (it's added to $PATH at |startup|).
+ *NoDefaultCurrentDirectoryInExePath*
+ On MS-Windows an executable in Vim's current working directory
+ is also normally found, but this can be disabled by setting
+ the $NoDefaultCurrentDirectoryInExePath environment variable.
+
The result is a Number:
1 exists
0 does not exist