1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 22:07:59 +01:00

only allow :source to accept a single filename

This commit is contained in:
Doug Kearns
2007-08-11 16:26:49 +00:00
parent 990bbe4b41
commit aea3f59392

View File

@@ -1017,7 +1017,16 @@ function Commands() //{{{
} }
)); ));
addDefaultCommand(new Command(["so[urce]"], addDefaultCommand(new Command(["so[urce]"],
function(args) { vimperator.source(args); }, function(args)
{
if (/[^\\]\s/.test(args))
{
vimperator.echoerr("E172: Only one file name allowed");
return;
}
vimperator.source(args);
},
{ {
usage: ["so[urce][!] {file}"], usage: ["so[urce][!] {file}"],
short_help: "Read Ex commands from {file}", short_help: "Read Ex commands from {file}",