forked from aniani/vim
updated for version 7.4.235
Problem: It is not easy to get the full path of a command. Solution: Add the exepath() function.
This commit is contained in:
@@ -2945,14 +2945,17 @@ mch_isdir(char_u *name)
|
||||
* Return -1 if unknown.
|
||||
*/
|
||||
int
|
||||
mch_can_exe(name)
|
||||
mch_can_exe(name, path)
|
||||
char_u *name;
|
||||
char_u **path;
|
||||
{
|
||||
char *p;
|
||||
|
||||
p = searchpath(name);
|
||||
if (p == NULL || mch_isdir(p))
|
||||
return FALSE;
|
||||
if (path != NULL)
|
||||
*path = vim_strsave(p);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user