1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 11:58:00 +01:00

automatically try to add .exe when running programs on windows

This commit is contained in:
Martin Stubenschrott
2008-05-25 21:02:23 +00:00
parent 69a04eeb09
commit f3926ba422
2 changed files with 17 additions and 0 deletions

4
NEWS
View File

@@ -1,8 +1,12 @@
<pre> <pre>
2008-05-14: 2008-05-14:
* version 1.1 * version 1.1
* try to add .exe automatically to filenames on windows, so :set editor=gvim -f
will automatically invoke gvim.exe (if it's in the path). Thanks to
Guido Van Hoecke
* readded visualbellstyle (thanks mauke) * readded visualbellstyle (thanks mauke)
* new popups=4 option * new popups=4 option
* many bug fixes as usual
2008-05-14: 2008-05-14:
* version 1.0 * version 1.0

View File

@@ -469,6 +469,19 @@ liberator.IO = function () //{{{
file.initWithPath(path); file.initWithPath(path);
if (file.exists()) if (file.exists())
break; break;
// automatically try to add common file extensions on windows
if (WINDOWS)
{
var extensions = [".exe", ".cmd", ".bat"];
for (let j = 0; j < extensions.length; j++)
{
path = dirs[i] + "\\" + program + extensions[j];
file.initWithPath(path);
if (file.exists())
break;
}
}
} }
catch (e) { } catch (e) { }
} }