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:
@@ -1017,7 +1017,16 @@ function Commands() //{{{
|
||||
}
|
||||
));
|
||||
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}"],
|
||||
short_help: "Read Ex commands from {file}",
|
||||
|
||||
Reference in New Issue
Block a user