Update plugins to use filepath completion

This commit is contained in:
James Booth
2016-10-10 22:46:53 +01:00
parent 39f5a03e78
commit 3f11319a5b
3 changed files with 14 additions and 3 deletions

View File

@@ -59,3 +59,4 @@ def prof_init(version, status, account_name, fulljid):
prof.register_command("/imgur", 1, 1, synopsis, description, args, examples, _cmd_imgur)
prof.completer_add("/imgur", [ "screenshot" ])
prof.filepath_completer_add("/imgur")

View File

@@ -442,7 +442,8 @@ def prof_init(version, status, account_name, fulljid):
"/python-test int get <group> <key>",
"/python-test int set <group> <key> <value>",
"/python-test incoming <barejid> <resource> <message>",
"/python-test completer add|remove <item>"
"/python-test completer add|remove <item>",
"/python-test file"
]
description = "Python test plugins. All commands focus the plugin window."
args = [
@@ -473,7 +474,8 @@ def prof_init(version, status, account_name, fulljid):
[ "int set <group> <key> <value>", "Set a integer setting" ],
[ "incoming <barejid> <resource> <message>", "Show an incoming message." ],
[ "completer add <item>", "Add an autocomplete item to the /c-test command." ],
[ "completer remove <item>", "Remove an autocomplete item from the /c-test command." ]
[ "completer remove <item>", "Remove an autocomplete item from the /c-test command." ],
[ "file", "Complete a file path." ]
]
examples = [
"/python-test sendline /about",
@@ -504,7 +506,8 @@ def prof_init(version, status, account_name, fulljid):
"string_list",
"int",
"incoming",
"completer"
"completer",
"file"
]
)
prof.completer_add("/python-test get",
@@ -529,6 +532,8 @@ def prof_init(version, status, account_name, fulljid):
[ "add", "remove" ]
)
prof.filepath_completer_add("/python-test file")
prof.register_timed(timed_callback, 5)

View File

@@ -605,6 +605,7 @@ prof_init(const char * const version, const char * const status, const char *con
"/c-test int set <group> <key> <value>",
"/c-test incoming <barejid> <resource> <message>",
"/c-test completer add|remove <item>",
"/c-test file",
NULL
};
char *description = "C test plugin. All commands focus the plugin window.";
@@ -637,6 +638,7 @@ prof_init(const char * const version, const char * const status, const char *con
{ "incoming <barejid> <resource> <message>", "Show an incoming message." },
{ "completer add <item>", "Add an autocomplete item to the /c-test command." },
{ "completer remove <item>", "Remove an autocomplete item from the /c-test command." },
{ "file", "Complete a file path." },
{ NULL, NULL }
};
@@ -670,6 +672,7 @@ prof_init(const char * const version, const char * const status, const char *con
"int",
"incoming",
"completer",
"file",
NULL
};
prof_completer_add("/c-test", cmd_ac);
@@ -695,6 +698,8 @@ prof_init(const char * const version, const char * const status, const char *con
char *completer_ac[] = { "add", "remove", NULL };
prof_completer_add("/c-test completer", completer_ac);
prof_filepath_completer_add("/c-test file");
prof_register_timed(timed_callback, 5);
}