mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
Complete with alias value for second argument of command /alias
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -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"
|
||||
|
||||
+4
-1
@@ -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 ""
|
||||
|
||||
@@ -860,6 +860,50 @@ alias_completion_cb (void *data, const char *completion_item,
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user