1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 20:35:47 +01:00

Fix commands.js

This commit is contained in:
Kris Maglione
2008-12-20 01:05:10 -05:00
parent 16c49fe786
commit e7a7093f0d
3 changed files with 15 additions and 8 deletions

View File

@@ -78,12 +78,6 @@ function Command(specs, description, action, extraInfo) //{{{
return { names: names, longNames: longNames, shortNames: shortNames };
};
// return the primary command name (the long name of the first spec listed)
/** @property {string} The command's cannonical name. */
this.name = this.longNames[0];
/** @property {string[]} All of this command's long and short names. */
this.names = expandedSpecs.names; // return all command name aliases
let expandedSpecs = parseSpecs(specs);
/** @property {string[]} All of this command's name spacs. e.g., "com[mand]" */
this.specs = specs;
@@ -92,6 +86,11 @@ function Command(specs, description, action, extraInfo) //{{{
/** @property {string[]} All of this command's long names, e.g., "command" */
this.longNames = expandedSpecs.longNames;
/** @property {string} The command's cannonical name. */
this.name = this.longNames[0];
/** @property {string[]} All of this command's long and short names. */
this.names = expandedSpecs.names; // return all command name aliases
/** @property {string} This command's description, as shown in :exinfo */
this.description = description || "";
/** @property {function (Args)} The function called to execute this command. */