mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-17 14:12:30 +02:00
only allow :source to accept a single filename
This commit is contained in:
1 parent
990bbe4b41
commit
aea3f59392
1 file changed
+10
-1
@@ -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