mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Fix bug
Require full command for regexp command
This commit is contained in:
parent
82037f5da7
commit
43ebb42108
@ -463,10 +463,10 @@ define(function(require, exports, module) {
|
||||
cmd += last.value;
|
||||
cmd = cmd.substr(1).trim();
|
||||
var args = cmd.split(/\s+/);
|
||||
cmd = args[0];
|
||||
var firstCmd = args[0];
|
||||
|
||||
if (this.commands[cmd]) {
|
||||
cmd = this.commands[cmd];
|
||||
if (this.commands[firstCmd]) {
|
||||
cmd = this.commands[firstCmd];
|
||||
if (typeof cmd == "string")
|
||||
return commands.exec(cmd, null, { argv: args });
|
||||
else if (typeof cmd == "function")
|
||||
@ -474,8 +474,8 @@ define(function(require, exports, module) {
|
||||
else if (cmd.exec)
|
||||
return cmd.exec(ed, { argv: args });
|
||||
}
|
||||
else if (commands.commands[cmd]) {
|
||||
commands.exec(cmd, null, { argv: args });
|
||||
else if (commands.commands[firstCmd]) {
|
||||
commands.exec(firstCmd, null, { argv: args });
|
||||
}
|
||||
else if (/^\d+$/.test(cmd)) {
|
||||
ed.gotoLine(cmd, 0, true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user