1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-15 18:15:45 +01:00

Make :undo a bit saner. Add TODO about config.name checks.

This commit is contained in:
Kris Maglione
2009-05-22 13:55:22 -04:00
parent 491d17a4a0
commit e9fc3327ed
9 changed files with 30 additions and 29 deletions

View File

@@ -54,6 +54,8 @@ the terms of any one of the MPL, the GPL or the LGPL.
*/
function Command(specs, description, action, extraInfo) //{{{
{
specs = Array.concat(specs);
if (!extraInfo)
extraInfo = {};
@@ -71,12 +73,12 @@ function Command(specs, description, action, extraInfo) //{{{
for (let [,spec] in Iterator(specs))
{
let matches = spec.match(/(\w+)\[(\w+)\]/);
let matches = spec.match(/(\w+)\[(\w+)\](\w*)/);
if (matches)
{
shortNames.push(matches[1]);
longNames.push(matches[1] + matches[2]);
shortNames.push(matches[1] + matches[3]);
longNames.push(matches[1] + matches[2] + matches[3]);
// order as long1, short1, long2, short2
names.push(matches[1] + matches[2]);
names.push(matches[1]);