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

add some more completion args for :command -complete

This commit is contained in:
Doug Kearns
2008-11-14 14:50:39 +00:00
parent 05a699dc53
commit 0b4232d401
4 changed files with 39 additions and 9 deletions

View File

@@ -795,6 +795,8 @@ function Completion() //{{{
////////////////////// COMPLETION TYPES ////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
autocmdEvent: function autocmdEvent(filter) [0, this.filter(config.autocommands, filter)],
bookmark: function (filter)
{
return {
@@ -908,6 +910,8 @@ function Completion() //{{{
dialog: function dialog(filter) [0, this.filter(config.dialogs, filter)],
directory: function (filter, tail) [0, this.file(filter, tail)[1].filter(function (f) f[1] == "Directory")],
environment: function environment(filter)
{
let command = liberator.has("Win32") ? "set" : "export";
@@ -923,8 +927,6 @@ function Completion() //{{{
return [0, this.filter(vars, filter)];
},
autocmdEvent: function autocmdEvent(filter) [0, this.filter(config.autocommands, filter)],
// provides completions for ex commands, including their arguments
ex: function ex(str)
{
@@ -1028,6 +1030,8 @@ function Completion() //{{{
return [0, this.filter(res, filter)];
},
highlightGroup: function highlightGroup(filter) commands.get("highlight").completer(filter), // XXX
history: function _history(filter) [0, history.get(filter)],
get javascriptCompleter() javascript,
@@ -1044,6 +1048,12 @@ function Completion() //{{{
return [0, this.filter(macros, filter)];
},
menuItem: function menuItem(filter) commands.get("emenu").completer(filter), // XXX
option: function option(filter) commands.get("set").completer(filter), // XXX
preference: function preference(filter) commands.get("set").completer(filter, true), // XXX
search: function search(filter)
{
let [, keyword, args] = filter.match(/^\s*(\S*)\s*(.*)/);
@@ -1163,9 +1173,9 @@ function Completion() //{{{
return [0, this.filter(panels, filter)];
},
stylesheet: function stylesheet(filter)
alternateStylesheet: function alternateStylesheet(filter)
{
var completions = buffer.alternateStyleSheets.map(
let completions = buffer.alternateStyleSheets.map(
function (stylesheet) [stylesheet.title, stylesheet.href || "inline"]
);