mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
Merge pull request #3291 from sethjackson/env-separator
Windows: use ';' as env $PATH separator
This commit is contained in:
@@ -151,7 +151,7 @@ static bool is_executable_in_path(const char_u *name, char_u **abspath)
|
|||||||
// Walk through all entries in $PATH to check if "name" exists there and
|
// Walk through all entries in $PATH to check if "name" exists there and
|
||||||
// is an executable file.
|
// is an executable file.
|
||||||
for (;; ) {
|
for (;; ) {
|
||||||
const char *e = xstrchrnul(path, ':');
|
const char *e = xstrchrnul(path, ENV_SEPCHAR);
|
||||||
|
|
||||||
// Glue together the given directory from $PATH with name and save into
|
// Glue together the given directory from $PATH with name and save into
|
||||||
// buf.
|
// buf.
|
||||||
@@ -169,7 +169,7 @@ static bool is_executable_in_path(const char_u *name, char_u **abspath)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*e != ':') {
|
if (*e != ENV_SEPCHAR) {
|
||||||
// End of $PATH without finding any executable called name.
|
// End of $PATH without finding any executable called name.
|
||||||
xfree(buf);
|
xfree(buf);
|
||||||
return false;
|
return false;
|
||||||
|
@@ -17,4 +17,7 @@
|
|||||||
// Special wildcards that need to be handled by the shell.
|
// Special wildcards that need to be handled by the shell.
|
||||||
#define SPECIAL_WILDCHAR "`'{"
|
#define SPECIAL_WILDCHAR "`'{"
|
||||||
|
|
||||||
|
// Separator character for environment variables.
|
||||||
|
#define ENV_SEPCHAR ':'
|
||||||
|
|
||||||
#endif // NVIM_OS_UNIX_DEFS_H
|
#endif // NVIM_OS_UNIX_DEFS_H
|
||||||
|
@@ -10,6 +10,9 @@
|
|||||||
|
|
||||||
#define FNAME_ILLEGAL "\"*?><|"
|
#define FNAME_ILLEGAL "\"*?><|"
|
||||||
|
|
||||||
|
// Separator character for environment variables.
|
||||||
|
#define ENV_SEPCHAR ';'
|
||||||
|
|
||||||
#define USE_CRNL
|
#define USE_CRNL
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
Reference in New Issue
Block a user