1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 09:48:00 +01:00

Context-specific completer options. Option refactoring.

New review
Owner: dougkearns
Hopefully the changeset hash will actually be linked this time. If
not, it's the tip of the testing branch, presumably r4161.
I've been meaning to do this for a while. It allows case matching,
sorting, and auto completion options to be assigned on a per context
basis, with fine grained control. It also adds builtin regex support
to options since it's used fairly extensively. There are definitely
other options that would benefit from the regexlist type, if I can
dig them up. The interface (and perhaps the doc wording) is the only
place I'm really ambivalent.

--HG--
branch : testing
This commit is contained in:
Kris Maglione
2009-11-20 15:37:39 -05:00
parent db1fb981cc
commit 61002641a3
14 changed files with 469 additions and 301 deletions

View File

@@ -894,10 +894,10 @@ const Commands = Module("commands", {
}
[prefix] = context.filter.match(/^(?:\w*[\s!]|!)\s*/);
let cmdContext = context.fork(cmd, prefix.length);
let cmdContext = context.fork(command.name, prefix.length);
let argContext = context.fork("args", prefix.length);
args = command.parseArgs(cmdContext.filter, argContext, { count: count, bang: bang });
if (args) {
if (args && !cmdContext.waitingForTab) {
// FIXME: Move to parseCommand
args.count = count;
args.bang = bang;