summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.asciidoc2
-rw-r--r--doc/de/autogen/plugin_api/completions.asciidoc4
-rw-r--r--doc/en/autogen/plugin_api/completions.asciidoc4
-rw-r--r--doc/fr/autogen/plugin_api/completions.asciidoc4
-rw-r--r--doc/it/autogen/plugin_api/completions.asciidoc4
-rw-r--r--doc/ja/autogen/plugin_api/completions.asciidoc4
-rw-r--r--doc/pl/autogen/plugin_api/completions.asciidoc4
-rw-r--r--po/cs.po10
-rw-r--r--po/de.po10
-rw-r--r--po/es.po10
-rw-r--r--po/fr.po10
-rw-r--r--po/hu.po10
-rw-r--r--po/it.po10
-rw-r--r--po/ja.po10
-rw-r--r--po/pl.po10
-rw-r--r--po/pt_BR.po10
-rw-r--r--po/ru.po10
-rw-r--r--po/tr.po10
-rw-r--r--po/weechat.pot8
-rw-r--r--src/plugins/script/script-command.c2
-rw-r--r--src/plugins/script/script-completion.c58
-rw-r--r--src/plugins/script/script-repo.c22
22 files changed, 211 insertions, 15 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index 36d5f569e..10da44be8 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -37,6 +37,8 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
plugin (level 2 or more)
* logger: display system error when the log file can not be written
(issue #541)
+* script: add completion with languages and extensions, support search by
+ language/extension in /script search
* script: add option script.scripts.download_timeout
* doc: add Czech man page and quickstart guide (issue #490)
* build: add scripts version.sh and build-debian.sh, separate stable from devel
diff --git a/doc/de/autogen/plugin_api/completions.asciidoc b/doc/de/autogen/plugin_api/completions.asciidoc
index d62ff4699..e85f843f4 100644
--- a/doc/de/autogen/plugin_api/completions.asciidoc
+++ b/doc/de/autogen/plugin_api/completions.asciidoc
@@ -66,8 +66,12 @@
| ruby | ruby_script | Liste der Skripten
+| script | script_extensions | list of script extensions
+
| script | script_files | Dateien die sich in den Skript-Verzeichnissen befinden
+| script | script_languages | list of script languages
+
| script | script_scripts | Liste der Skripten im Repositorium
| script | script_scripts_installed | Auflistung der installierten Skripten (vom Repositorium)
diff --git a/doc/en/autogen/plugin_api/completions.asciidoc b/doc/en/autogen/plugin_api/completions.asciidoc
index 157b6ac14..b53d7f289 100644
--- a/doc/en/autogen/plugin_api/completions.asciidoc
+++ b/doc/en/autogen/plugin_api/completions.asciidoc
@@ -66,8 +66,12 @@
| ruby | ruby_script | list of scripts
+| script | script_extensions | list of script extensions
+
| script | script_files | files in script directories
+| script | script_languages | list of script languages
+
| script | script_scripts | list of scripts in repository
| script | script_scripts_installed | list of scripts installed (from repository)
diff --git a/doc/fr/autogen/plugin_api/completions.asciidoc b/doc/fr/autogen/plugin_api/completions.asciidoc
index e50200185..2a74ffe30 100644
--- a/doc/fr/autogen/plugin_api/completions.asciidoc
+++ b/doc/fr/autogen/plugin_api/completions.asciidoc
@@ -66,8 +66,12 @@
| ruby | ruby_script | liste des scripts
+| script | script_extensions | liste des extensions de script
+
| script | script_files | fichiers dans les répertoires de script
+| script | script_languages | liste des langages de script
+
| script | script_scripts | liste des scripts du dépôt
| script | script_scripts_installed | liste des scripts installés (du dépôt)
diff --git a/doc/it/autogen/plugin_api/completions.asciidoc b/doc/it/autogen/plugin_api/completions.asciidoc
index b735f5ad7..6f607a22f 100644
--- a/doc/it/autogen/plugin_api/completions.asciidoc
+++ b/doc/it/autogen/plugin_api/completions.asciidoc
@@ -66,8 +66,12 @@
| ruby | ruby_script | elenco degli script
+| script | script_extensions | list of script extensions
+
| script | script_files | file nella directory degli script
+| script | script_languages | list of script languages
+
| script | script_scripts | elenco degli script nel repository
| script | script_scripts_installed | elenco degli script installati (dal repository)
diff --git a/doc/ja/autogen/plugin_api/completions.asciidoc b/doc/ja/autogen/plugin_api/completions.asciidoc
index 066b3c208..804d651e6 100644
--- a/doc/ja/autogen/plugin_api/completions.asciidoc
+++ b/doc/ja/autogen/plugin_api/completions.asciidoc
@@ -66,8 +66,12 @@
| ruby | ruby_script | スクリプトのリスト
+| script | script_extensions | list of script extensions
+
| script | script_files | スクリプトディレクトリ内のファイル
+| script | script_languages | list of script languages
+
| script | script_scripts | リポジトリに存在するスクリプトのリスト
| script | script_scripts_installed | インストール済みスクリプトのリスト (リポジトリから)
diff --git a/doc/pl/autogen/plugin_api/completions.asciidoc b/doc/pl/autogen/plugin_api/completions.asciidoc
index 4057a311c..fc1a319d8 100644
--- a/doc/pl/autogen/plugin_api/completions.asciidoc
+++ b/doc/pl/autogen/plugin_api/completions.asciidoc
@@ -66,8 +66,12 @@
| ruby | ruby_script | lista skryptów
+| script | script_extensions | list of script extensions
+
| script | script_files | pliki w katalogach skryptów
+| script | script_languages | list of script languages
+
| script | script_scripts | lista skryptów w repozytorium
| script | script_scripts_installed | lista zainstalowanych skryptów (z repozytorium)
diff --git a/po/cs.po b/po/cs.po
index f6caa6a2d..45e81ca52 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-12-02 19:26+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10147,6 +10147,14 @@ msgstr ""
" /script upgrade"
#, fuzzy
+msgid "list of script languages"
+msgstr "seznam skriptů"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "seznam skriptů"
+
+#, fuzzy
msgid "list of scripts in repository"
msgstr "seznam skriptů"
diff --git a/po/de.po b/po/de.po
index de708b7fb..504c11814 100644
--- a/po/de.po
+++ b/po/de.po
@@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-12-03 20:51+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <>\n"
@@ -11518,6 +11518,14 @@ msgstr ""
" /script reload urlserver\n"
" /script upgrade"
+#, fuzzy
+msgid "list of script languages"
+msgstr "Liste der Skripten"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "Liste der Skripten"
+
msgid "list of scripts in repository"
msgstr "Liste der Skripten im Repositorium"
diff --git a/po/es.po b/po/es.po
index a8d55e1b5..bfdbfb406 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-12-02 19:26+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10412,6 +10412,14 @@ msgid ""
" /script upgrade"
msgstr ""
+#, fuzzy
+msgid "list of script languages"
+msgstr "lista de scripts"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "lista de scripts"
+
msgid "list of scripts in repository"
msgstr "lista de scripts en el repositorio"
diff --git a/po/fr.po b/po/fr.po
index be577ba1c..78005a683 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
-"PO-Revision-Date: 2015-12-02 19:26+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
+"PO-Revision-Date: 2015-12-09 07:29+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -11262,6 +11262,12 @@ msgstr ""
" /script reload urlserver\n"
" /script upgrade"
+msgid "list of script languages"
+msgstr "liste des langages de script"
+
+msgid "list of script extensions"
+msgstr "liste des extensions de script"
+
msgid "list of scripts in repository"
msgstr "liste des scripts du dépôt"
diff --git a/po/hu.po b/po/hu.po
index 2aa16ded3..1e940d570 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-12-02 19:26+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9459,6 +9459,14 @@ msgid ""
msgstr ""
#, fuzzy
+msgid "list of script languages"
+msgstr "Aliaszok listája:\n"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "Aliaszok listája:\n"
+
+#, fuzzy
msgid "list of scripts in repository"
msgstr "Aliaszok listája:\n"
diff --git a/po/it.po b/po/it.po
index 16660920f..923c19164 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-12-02 19:26+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10592,6 +10592,14 @@ msgid ""
" /script upgrade"
msgstr ""
+#, fuzzy
+msgid "list of script languages"
+msgstr "elenco degli script"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "elenco degli script"
+
msgid "list of scripts in repository"
msgstr "elenco degli script nel repository"
diff --git a/po/ja.po b/po/ja.po
index df42b5980..99d0a02d1 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-12-02 19:26+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n"
@@ -10836,6 +10836,14 @@ msgstr ""
" /script reload urlserver\n"
" /script upgrade"
+#, fuzzy
+msgid "list of script languages"
+msgstr "スクリプトのリスト"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "スクリプトのリスト"
+
msgid "list of scripts in repository"
msgstr "リポジトリに存在するスクリプトのリスト"
diff --git a/po/pl.po b/po/pl.po
index c91a3d618..b3d56fc8f 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-12-02 19:26+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11008,6 +11008,14 @@ msgstr ""
" /script reload urlserver\n"
" /script upgrade"
+#, fuzzy
+msgid "list of script languages"
+msgstr "lista skryptów"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "lista skryptów"
+
msgid "list of scripts in repository"
msgstr "lista skryptów w repozytorium"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index c74360315..362705067 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-09-30 20:56+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9890,6 +9890,14 @@ msgid ""
msgstr ""
#, fuzzy
+msgid "list of script languages"
+msgstr "list de scripts"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "list de scripts"
+
+#, fuzzy
msgid "list of scripts in repository"
msgstr "list de scripts"
diff --git a/po/ru.po b/po/ru.po
index 0c1884dd2..2d3947f48 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-12-02 19:26+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9490,6 +9490,14 @@ msgid ""
msgstr ""
#, fuzzy
+msgid "list of script languages"
+msgstr "Список сокращений:\n"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "Список сокращений:\n"
+
+#, fuzzy
msgid "list of scripts in repository"
msgstr "Список сокращений:\n"
diff --git a/po/tr.po b/po/tr.po
index 5a5bcf786..c9bcdb0c7 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2015-03-10 21:33+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8580,6 +8580,14 @@ msgid ""
" /script upgrade"
msgstr ""
+#, fuzzy
+msgid "list of script languages"
+msgstr "betiklerin listesi"
+
+#, fuzzy
+msgid "list of script extensions"
+msgstr "betiklerin listesi"
+
msgid "list of scripts in repository"
msgstr "depodaki betiklerin listesi"
diff --git a/po/weechat.pot b/po/weechat.pot
index a08fe39d0..385544799 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-12-02 19:24+0100\n"
+"POT-Creation-Date: 2015-12-09 07:27+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8502,6 +8502,12 @@ msgid ""
" /script upgrade"
msgstr ""
+msgid "list of script languages"
+msgstr ""
+
+msgid "list of script extensions"
+msgstr ""
+
msgid "list of scripts in repository"
msgstr ""
diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c
index 164ec55a6..8caabdc20 100644
--- a/src/plugins/script/script-command.c
+++ b/src/plugins/script/script-command.c
@@ -366,7 +366,7 @@ script_command_init ()
" /script reload urlserver\n"
" /script upgrade"),
"list -o|-i"
- " || search %(script_tags)"
+ " || search %(script_tags)|%(script_languages)|%(script_extensions)"
" || show %(script_scripts)"
" || load %(script_files)|%*"
" || unload %(python_script)|%(perl_script)|%(ruby_script)|"
diff --git a/src/plugins/script/script-completion.c b/src/plugins/script/script-completion.c
index 16749c56e..50d2e65fe 100644
--- a/src/plugins/script/script-completion.c
+++ b/src/plugins/script/script-completion.c
@@ -30,6 +30,58 @@
/*
+ * Adds script languages (python, perl, ruby, ...) to completion list.
+ */
+
+int
+script_completion_languages_cb (void *data, const char *completion_item,
+ struct t_gui_buffer *buffer,
+ struct t_gui_completion *completion)
+{
+ int i;
+
+ /* make C compiler happy */
+ (void) data;
+ (void) completion_item;
+ (void) buffer;
+
+ for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++)
+ {
+ weechat_hook_completion_list_add (completion,
+ script_language[i],
+ 0, WEECHAT_LIST_POS_SORT);
+ }
+
+ return WEECHAT_RC_OK;
+}
+
+/*
+ * Adds script extensions (py, pl, rb, ...) to completion list.
+ */
+
+int
+script_completion_extensions_cb (void *data, const char *completion_item,
+ struct t_gui_buffer *buffer,
+ struct t_gui_completion *completion)
+{
+ int i;
+
+ /* make C compiler happy */
+ (void) data;
+ (void) completion_item;
+ (void) buffer;
+
+ for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++)
+ {
+ weechat_hook_completion_list_add (completion,
+ script_extension[i],
+ 0, WEECHAT_LIST_POS_SORT);
+ }
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Adds scripts to completion list.
*/
@@ -215,6 +267,12 @@ script_completion_tags_cb (void *data, const char *completion_item,
void
script_completion_init ()
{
+ weechat_hook_completion ("script_languages",
+ N_("list of script languages"),
+ &script_completion_languages_cb, NULL);
+ weechat_hook_completion ("script_extensions",
+ N_("list of script extensions"),
+ &script_completion_extensions_cb, NULL);
weechat_hook_completion ("script_scripts",
N_("list of scripts in repository"),
&script_completion_scripts_cb, NULL);
diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c
index bef5fad17..fed8473bd 100644
--- a/src/plugins/script/script-repo.c
+++ b/src/plugins/script/script-repo.c
@@ -948,13 +948,33 @@ script_repo_match_filter (struct t_script_repo *script)
if (!has_tag)
{
match = 0;
+
if (script->name_with_extension
- && weechat_strcasestr (script->name_with_extension, words[i]))
+ && weechat_strcasestr (script->name_with_extension,
+ words[i]))
+ {
match = 1;
+ }
+
+ if (!match
+ && (weechat_strcasecmp (script_language[script->language],
+ words[i]) == 0))
+ {
+ match = 1;
+ }
+
+ if (!match
+ && (weechat_strcasecmp (script_extension[script->language],
+ words[i]) == 0))
+ {
+ match = 1;
+ }
if (!match && script->description
&& weechat_strcasestr (script->description, words[i]))
+ {
match = 1;
+ }
if (!match)
{