1
- *builtin.txt* For Vim version 9.1. Last change: 2024 Jul 28
1
+ *builtin.txt* For Vim version 9.1. Last change: 2024 Aug 08
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2532,8 +2532,10 @@ executable({expr}) *executable()*
2532
2532
This function checks if an executable with the name {expr}
2533
2533
exists. {expr} must be the name of the program without any
2534
2534
arguments.
2535
+
2535
2536
executable() uses the value of $PATH and/or the normal
2536
- searchpath for programs. *PATHEXT*
2537
+ searchpath for programs.
2538
+ *PATHEXT*
2537
2539
On MS-Windows the ".exe", ".bat", etc. can optionally be
2538
2540
included. Then the extensions in $PATHEXT are tried. Thus if
2539
2541
"foo.exe" does not exist, "foo.exe.bat" can be found. If
@@ -2543,11 +2545,14 @@ executable({expr}) *executable()*
2543
2545
then the name is also tried without adding an extension.
2544
2546
On MS-Windows it only checks if the file exists and is not a
2545
2547
directory, not if it's really executable.
2546
- On MS-Windows an executable in the same directory as Vim is
2547
- normally found. Since this directory is added to $PATH it
2548
- should also work to execute it | win32-PATH | . This can be
2549
- disabled by setting the $NoDefaultCurrentDirectoryInExePath
2550
- environment variable. *NoDefaultCurrentDirectoryInExePath*
2548
+ On MS-Windows an executable in the same directory as the Vim
2549
+ executable is always found. Since this directory is added to
2550
+ $PATH it should also work to execute it | win32-PATH | .
2551
+ *NoDefaultCurrentDirectoryInExePath*
2552
+ On MS-Windows an executable in Vim's current working directory
2553
+ is also normally found, but this can be disabled by setting
2554
+ the $NoDefaultCurrentDirectoryInExePath environment variable.
2555
+
2551
2556
The result is a Number:
2552
2557
1 exists
2553
2558
0 does not exist
0 commit comments