diff --git a/content/commands.js b/content/commands.js index 4eee17a1..3b54e657 100644 --- a/content/commands.js +++ b/content/commands.js @@ -472,7 +472,7 @@ function Commands() //{{{ { // Push possible option matches into completions if (complete && !onlyArgumentsRemaining) - completeOpts = [[opt[0][0], opt[0][0]] for ([i, opt] in Iterator(options)) if (opt[0][0].indexOf(arg) == 0)]; + completeOpts = [[opt[0], opt[0][0]] for ([i, opt] in Iterator(options))]; } function resetCompletions() { diff --git a/content/options.js b/content/options.js index d0953413..ae3f255e 100644 --- a/content/options.js +++ b/content/options.js @@ -665,7 +665,7 @@ function Options() //{{{ }, { bang: true, - completer: function (context, args) + completer: function (context, args, modifiers) { let filter = context.filter; var optionCompletions = []; @@ -688,7 +688,7 @@ function Options() //{{{ let prefix = (filter.match(/^(no|inv)/) || [""])[0]; if (prefix) - filter = filter.substr(prefix.length); + context.filter = filter = filter.substr(prefix.length); let scope = modifiers && modifiers.scope || options.OPTION_SCOPE_BOTH; @@ -698,7 +698,7 @@ function Options() //{{{ if (filter.indexOf("=") == -1) { context.title = ["Option"]; - context.quote = function (name) prefix + name; + context.quote = [prefix, util.identity, ""]; context.keys = { text: "names", description: "description" }; context.completions = [opt for (opt in opts)]; return;