summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--doc/de/autogen/plugin_api/completions.txt2
-rw-r--r--doc/en/autogen/plugin_api/completions.txt2
-rw-r--r--doc/fr/autogen/plugin_api/completions.txt2
-rw-r--r--doc/it/autogen/plugin_api/completions.txt2
-rw-r--r--po/cs.po6
-rw-r--r--po/de.po6
-rw-r--r--po/es.po6
-rw-r--r--po/fr.po7
-rw-r--r--po/hu.po6
-rw-r--r--po/it.po6
-rw-r--r--po/pl.po6
-rw-r--r--po/ru.po6
-rw-r--r--po/weechat.pot5
-rw-r--r--src/plugins/alias/alias.c48
15 files changed, 100 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 7345b38ac..c45cdc28b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,7 @@ Version 0.3.4 (under dev!)
nicklist_group_get_string, nicklist_group_get_pointer, nicklist_group_set,
nicklist_nick_get_integer, nicklist_nick_get_string, nicklist_nick_get_pointer,
nicklist_nick_set
+* alias: complete with alias value for second argument of command /alias
* irc: add command /notify, new options irc.look.notify_tags_ison,
irc.look.notify_tags_whois, irc.network.notify_check_ison,
irc.network.notify_check_whois, new option "notify" in servers, new infolist
diff --git a/doc/de/autogen/plugin_api/completions.txt b/doc/de/autogen/plugin_api/completions.txt
index 177be93cb..9a8212dd0 100644
--- a/doc/de/autogen/plugin_api/completions.txt
+++ b/doc/de/autogen/plugin_api/completions.txt
@@ -4,6 +4,8 @@
| alias | alias | Liste der Alias
+| alias | alias_value | value of alias
+
| aspell | aspell_langs | Liste der Unterstützten Übersetzungen (lang) für aspell
| irc | irc_channel | Aktueller IRC-Channel
diff --git a/doc/en/autogen/plugin_api/completions.txt b/doc/en/autogen/plugin_api/completions.txt
index f9ab6bc73..9987a8953 100644
--- a/doc/en/autogen/plugin_api/completions.txt
+++ b/doc/en/autogen/plugin_api/completions.txt
@@ -4,6 +4,8 @@
| alias | alias | list of aliases
+| alias | alias_value | value of alias
+
| aspell | aspell_langs | list of supported langs for aspell
| irc | irc_channel | current IRC channel
diff --git a/doc/fr/autogen/plugin_api/completions.txt b/doc/fr/autogen/plugin_api/completions.txt
index 4f07b8f11..5f45c0b14 100644
--- a/doc/fr/autogen/plugin_api/completions.txt
+++ b/doc/fr/autogen/plugin_api/completions.txt
@@ -4,6 +4,8 @@
| alias | alias | liste des alias
+| alias | alias_value | valeur de l'alias
+
| aspell | aspell_langs | liste des langues supportées pour aspell
| irc | irc_channel | canal IRC courant
diff --git a/doc/it/autogen/plugin_api/completions.txt b/doc/it/autogen/plugin_api/completions.txt
index 245f9e1f5..9e0dc0e6a 100644
--- a/doc/it/autogen/plugin_api/completions.txt
+++ b/doc/it/autogen/plugin_api/completions.txt
@@ -4,6 +4,8 @@
| alias | alias | elenco di alias
+| alias | alias_value | value of alias
+
| aspell | aspell_langs | elenco di lingue supportate per aspell
| irc | irc_channel | canale IRC corrente
diff --git a/po/cs.po b/po/cs.po
index 27204781c..5e4ed5581 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-11-09 15:01+0100\n"
+"POT-Creation-Date: 2010-11-09 15:47+0100\n"
"PO-Revision-Date: 2010-11-06 11:55+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2750,6 +2750,10 @@ msgstr "jméno_aliasu: jméno aliasu pro odebrání"
msgid "list of aliases"
msgstr "seznam aliasů"
+#, fuzzy
+msgid "value of alias"
+msgstr "seznam aliasů"
+
#, c-format
msgid "%s%s: error creating completion for alias \"%s\": alias not found"
msgstr "%s%s: chyba vytváření doplňování pro alias \"%s\": alias nenalezen"
diff --git a/po/de.po b/po/de.po
index 7dd6545ea..727e63649 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-11-09 15:01+0100\n"
+"POT-Creation-Date: 2010-11-09 15:47+0100\n"
"PO-Revision-Date: 2010-11-06 11:55+0100\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2873,6 +2873,10 @@ msgstr "alias_name: Name des zu löschenden Alias"
msgid "list of aliases"
msgstr "Liste der Alias"
+#, fuzzy
+msgid "value of alias"
+msgstr "Liste der Alias"
+
#, c-format
msgid "%s%s: error creating completion for alias \"%s\": alias not found"
msgstr ""
diff --git a/po/es.po b/po/es.po
index 822caed2c..eaa8788cd 100644
--- a/po/es.po
+++ b/po/es.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-11-09 15:01+0100\n"
+"POT-Creation-Date: 2010-11-09 15:47+0100\n"
"PO-Revision-Date: 2010-11-06 11:56+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2790,6 +2790,10 @@ msgstr "nombre_alias: nombre del alias a suprimir"
msgid "list of aliases"
msgstr "lista de alias"
+#, fuzzy
+msgid "value of alias"
+msgstr "lista de alias"
+
#, c-format
msgid "%s%s: error creating completion for alias \"%s\": alias not found"
msgstr ""
diff --git a/po/fr.po b/po/fr.po
index f8ca2bd70..f95137e3d 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-11-09 15:01+0100\n"
-"PO-Revision-Date: 2010-11-08 15:03+0100\n"
+"POT-Creation-Date: 2010-11-09 15:47+0100\n"
+"PO-Revision-Date: 2010-11-09 15:47+0100\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -2827,6 +2827,9 @@ msgstr "nom_alias: nom de l'alias à supprimer"
msgid "list of aliases"
msgstr "liste des alias"
+msgid "value of alias"
+msgstr "valeur de l'alias"
+
#, c-format
msgid "%s%s: error creating completion for alias \"%s\": alias not found"
msgstr ""
diff --git a/po/hu.po b/po/hu.po
index 5dae0c1a1..b2f2b4ff1 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-11-09 15:01+0100\n"
+"POT-Creation-Date: 2010-11-09 15:47+0100\n"
"PO-Revision-Date: 2010-11-05 17:17+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2587,6 +2587,10 @@ msgstr "alias_név: az eltávolítandó alias neve"
msgid "list of aliases"
msgstr "Aliaszok listája:\n"
+#, fuzzy
+msgid "value of alias"
+msgstr "Aliaszok listája:\n"
+
#, fuzzy, c-format
msgid "%s%s: error creating completion for alias \"%s\": alias not found"
msgstr "%s a \"%s\" opció nem található\n"
diff --git a/po/it.po b/po/it.po
index 664a169ea..49b43234c 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-11-09 15:01+0100\n"
+"POT-Creation-Date: 2010-11-09 15:47+0100\n"
"PO-Revision-Date: 2010-11-06 11:56+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2801,6 +2801,10 @@ msgstr "nome_alias: nome di un alias da eliminare"
msgid "list of aliases"
msgstr "elenco di alias"
+#, fuzzy
+msgid "value of alias"
+msgstr "elenco di alias"
+
#, c-format
msgid "%s%s: error creating completion for alias \"%s\": alias not found"
msgstr ""
diff --git a/po/pl.po b/po/pl.po
index 07c665882..dd7c069d3 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-11-09 15:01+0100\n"
+"POT-Creation-Date: 2010-11-09 15:47+0100\n"
"PO-Revision-Date: 2010-11-06 11:56+0100\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2783,6 +2783,10 @@ msgstr "nazwa_aliasu: nazwa aliasu do usunięcia"
msgid "list of aliases"
msgstr "lista aliasów"
+#, fuzzy
+msgid "value of alias"
+msgstr "lista aliasów"
+
#, c-format
msgid "%s%s: error creating completion for alias \"%s\": alias not found"
msgstr ""
diff --git a/po/ru.po b/po/ru.po
index 10e998e00..04ff76118 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-11-09 15:01+0100\n"
+"POT-Creation-Date: 2010-11-09 15:47+0100\n"
"PO-Revision-Date: 2010-11-05 17:17+0100\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2606,6 +2606,10 @@ msgstr "сокращение: удаляемое сокращение"
msgid "list of aliases"
msgstr "Список сокращений:\n"
+#, fuzzy
+msgid "value of alias"
+msgstr "Список сокращений:\n"
+
#, fuzzy, c-format
msgid "%s%s: error creating completion for alias \"%s\": alias not found"
msgstr "%s параметр конфигурации \"%s\" не найден\n"
diff --git a/po/weechat.pot b/po/weechat.pot
index 873e3fa52..f2e21bb01 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-11-09 15:01+0100\n"
+"POT-Creation-Date: 2010-11-09 15:47+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -2220,6 +2220,9 @@ msgstr ""
msgid "list of aliases"
msgstr ""
+msgid "value of alias"
+msgstr ""
+
#, c-format
msgid "%s%s: error creating completion for alias \"%s\": alias not found"
msgstr ""
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c
index d4f5e9245..f1ae94a08 100644
--- a/src/plugins/alias/alias.c
+++ b/src/plugins/alias/alias.c
@@ -861,6 +861,50 @@ alias_completion_cb (void *data, const char *completion_item,
}
/*
+ * alias_value_completion_cb: callback for completion with value of an alias
+ */
+
+int
+alias_value_completion_cb (void *data, const char *completion_item,
+ struct t_gui_buffer *buffer,
+ struct t_gui_completion *completion)
+{
+ const char *args;
+ char *pos, *alias_name;
+ struct t_alias *ptr_alias;
+
+ /* make C compiler happy */
+ (void) data;
+ (void) completion_item;
+ (void) buffer;
+
+ args = weechat_hook_completion_get_string (completion, "args");
+ if (args)
+ {
+ pos = strchr (args, ' ');
+ if (pos)
+ alias_name = weechat_strndup (args, pos - args);
+ else
+ alias_name = strdup (args);
+
+ if (alias_name)
+ {
+ ptr_alias = alias_search (alias_name);
+ if (ptr_alias)
+ {
+ weechat_hook_completion_list_add (completion,
+ ptr_alias->command,
+ 0,
+ WEECHAT_LIST_POS_BEGINNING);
+ }
+ free (alias_name);
+ }
+ }
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* alias_add_to_infolist: add an alias in an infolist
* return 1 if ok, 0 if error
*/
@@ -949,7 +993,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
" alias /forcejoin to send IRC command "
"\"forcejoin\" with completion of /sajoin:\n"
" /alias -completion %%sajoin forcejoin /quote forcejoin"),
- "%(alias)|-completion %(commands)",
+ "%(alias)|-completion %(commands)|%(alias_value)",
&alias_command_cb, NULL);
weechat_hook_command ("unalias", N_("remove aliases"),
@@ -960,6 +1004,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
weechat_hook_completion ("alias", N_("list of aliases"),
&alias_completion_cb, NULL);
+ weechat_hook_completion ("alias_value", N_("value of alias"),
+ &alias_value_completion_cb, NULL);
alias_info_init ();