diff --git a/ChangeLog b/ChangeLog index 1aa039526..8d4d5e75f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ Version 0.3.1 (under dev!) * core: fix plural form in translation files (bug #27430) * core: fix terminal title bug: do not reset it when option weechat.look.set_title is off (bug #27399) +* alias: allow use of wildcards for /alias list (patch #6925) * alias: fix bug with arguments (bug #27440) * irc: add options for CTCP, to block/customize CTCP reply (task #9693) * irc: add missing CTCP: clientinfo, finger, source, time, userinfo (task #7270) diff --git a/doc/en/autogen/user/alias_commands.txt b/doc/en/autogen/user/alias_commands.txt index 06ef1cd7d..58d3497db 100644 --- a/doc/en/autogen/user/alias_commands.txt +++ b/doc/en/autogen/user/alias_commands.txt @@ -3,7 +3,7 @@ ........................................ create an alias for a command - alias_name: name of alias + alias_name: name of alias (can start or end with "*" for alias listing) command: command name (many commands can be separated by semicolons) arguments: arguments for command diff --git a/doc/fr/autogen/user/alias_commands.txt b/doc/fr/autogen/user/alias_commands.txt index aeffbec08..1428dbf34 100644 --- a/doc/fr/autogen/user/alias_commands.txt +++ b/doc/fr/autogen/user/alias_commands.txt @@ -3,7 +3,7 @@ ........................................ créer un alias pour une commande - nom_alias: nom de l'alias + nom_alias: nom de l'alias (peut démarrer ou se terminer par "*" pour une liste d'alias) commande: nom de la commande (plusieurs commandes peuvent être séparées par des point-virgules) paramètres: paramètres pour la commande diff --git a/po/cs.po b/po/cs.po index 7c46fcd50..db733846e 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-09-19 10:52+0200\n" +"POT-Creation-Date: 2009-09-30 17:39+0200\n" "PO-Revision-Date: 2009-09-14 10:56+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -2322,15 +2322,13 @@ msgstr "%s%s: chyba vytváření aliasu \"%s\" => \"%s\"" msgid "Alias \"%s\" => \"%s\" created" msgstr "Alias \"%s\" => \"%s\" vytvořen" -msgid "Alias:" -msgstr "Alias:" - -msgid "No alias found" -msgstr "Žádné aliasy nenalezeny" - msgid "List of aliases:" msgstr "Seznam aliasů:" +#, fuzzy, c-format +msgid "No alias found matching \"%s\"" +msgstr "Žádný server s \"%s\" nenalezen" + msgid "No alias defined" msgstr "Žádné aliasy nejsou definovány" @@ -2348,8 +2346,9 @@ msgstr "vytvoří alias pro příkaz" msgid "[alias_name [command [arguments]]]" msgstr "[jméno_aliasu [příkaz [argumenty]]]" +#, fuzzy msgid "" -"alias_name: name of alias\n" +"alias_name: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name (many commands can be separated by semicolons)\n" " arguments: arguments for command\n" "\n" @@ -5636,6 +5635,12 @@ msgstr "%s%s: nemohu nastavit \"neblokovaci\" volbu na soket" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: vypršel časový limit \"%s\" pro %s" +#~ msgid "Alias:" +#~ msgstr "Alias:" + +#~ msgid "No alias found" +#~ msgstr "Žádné aliasy nenalezeny" + #~ msgid "%s%s: cannot read data from socket, disconnecting from server..." #~ msgstr "%s%s: nemůžu přečíst data ze soketu, odpojuji se od serveru..." diff --git a/po/de.po b/po/de.po index 3bd2a4685..704831fea 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-09-19 10:52+0200\n" +"POT-Creation-Date: 2009-09-30 17:39+0200\n" "PO-Revision-Date: 2009-09-20 13:58+0200\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -2198,15 +2198,13 @@ msgstr "%s nicht genügend Speicher für Infobar-Nachricht\n" msgid "Alias \"%s\" => \"%s\" created" msgstr "Alias \"%s\" => \"%s\" angelegt" -msgid "Alias:" -msgstr "Alias:" - -msgid "No alias found" -msgstr "Keine Aliases gefunden" - msgid "List of aliases:" msgstr "Liste der Aliases:" +#, fuzzy, c-format +msgid "No alias found matching \"%s\"" +msgstr "Server '%s' nicht gefunden.\n" + msgid "No alias defined" msgstr "Keine Aliases definiert" @@ -2226,7 +2224,7 @@ msgstr "[Aliasname [Befehl [Argumente]]]" #, fuzzy msgid "" -"alias_name: name of alias\n" +"alias_name: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name (many commands can be separated by semicolons)\n" " arguments: arguments for command\n" "\n" @@ -5455,6 +5453,12 @@ msgstr "%s DCC: kann die 'nonblock'-Option für den Socket nicht festlegen\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" +#~ msgid "Alias:" +#~ msgstr "Alias:" + +#~ msgid "No alias found" +#~ msgstr "Keine Aliases gefunden" + #, fuzzy #~ msgid "%s%s: error sending data to IRC server (%s)" #~ msgstr "%s Fehler beim Senden von Daten an den IRC-Server\n" diff --git a/po/es.po b/po/es.po index 8351ebd84..24260b348 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-09-19 10:52+0200\n" +"POT-Creation-Date: 2009-09-30 17:39+0200\n" "PO-Revision-Date: 2009-09-06 21:25+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -2148,17 +2148,14 @@ msgstr "No hay suficiente memoria para el mensaje de la barra de información\n" msgid "Alias \"%s\" => \"%s\" created" msgstr "Alias \"%s\" => \"%s\" creado\n" -msgid "Alias:" -msgstr "" - -#, fuzzy -msgid "No alias found" -msgstr "Ningún alias definido.\n" - #, fuzzy msgid "List of aliases:" msgstr "Lista de alias:\n" +#, fuzzy, c-format +msgid "No alias found matching \"%s\"" +msgstr "Ningún servidor encontrado con \"%s\"" + #, fuzzy msgid "No alias defined" msgstr "Ningún alias definido.\n" @@ -2179,7 +2176,7 @@ msgstr "[nombre_alias [comando [argumentos]]]" #, fuzzy msgid "" -"alias_name: name of alias\n" +"alias_name: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name (many commands can be separated by semicolons)\n" " arguments: arguments for command\n" "\n" @@ -5486,6 +5483,10 @@ msgstr "%s no es posible crear el servidor\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s falta un argumento para la opción --dir\n" +#, fuzzy +#~ msgid "No alias found" +#~ msgstr "Ningún alias definido.\n" + #~ msgid "%s%s: error sending data to IRC server (%s)" #~ msgstr "%s%s: error al enviar datos al servidor IRC (%s)" diff --git a/po/fr.po b/po/fr.po index 4fff89aaf..25c72054b 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-09-19 10:52+0200\n" -"PO-Revision-Date: 2009-09-19 10:53+0200\n" +"POT-Creation-Date: 2009-09-30 17:39+0200\n" +"PO-Revision-Date: 2009-09-30 17:40+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -2378,15 +2378,13 @@ msgstr "%s%s: erreur en création de l'alias \"%s\" => \"%s\"" msgid "Alias \"%s\" => \"%s\" created" msgstr "Alias \"%s\" => \"%s\" créé" -msgid "Alias:" -msgstr "Alias:" - -msgid "No alias found" -msgstr "Aucun alias trouvé." - msgid "List of aliases:" msgstr "Liste des alias:" +#, c-format +msgid "No alias found matching \"%s\"" +msgstr "Pas d'alias trouvé correspondant à \"%s\"" + msgid "No alias defined" msgstr "Aucun alias défini" @@ -2405,7 +2403,7 @@ msgid "[alias_name [command [arguments]]]" msgstr "[nom_alias [commande [paramètres]]]" msgid "" -"alias_name: name of alias\n" +"alias_name: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name (many commands can be separated by semicolons)\n" " arguments: arguments for command\n" "\n" @@ -2416,7 +2414,8 @@ msgid "" "Variables $nick, $channel and $server are replaced by current nick/channel/" "server." msgstr "" -" nom_alias: nom de l'alias\n" +" nom_alias: nom de l'alias (peut démarrer ou se terminer par \"*\" pour une " +"liste d'alias)\n" " commande: nom de la commande (plusieurs commandes peuvent être séparées " "par des point-virgules)\n" "paramètres: paramètres pour la commande\n" @@ -5749,6 +5748,12 @@ msgstr "%s%s: impossible de positionner l'option \"nonblock\" pour la socket" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: délai d'attente dépassé pour \"%s\" avec %s" +#~ msgid "Alias:" +#~ msgstr "Alias:" + +#~ msgid "No alias found" +#~ msgstr "Aucun alias trouvé." + #~ msgid "%s%s: cannot read data from socket, disconnecting from server..." #~ msgstr "" #~ "%s%s: impossible de lire des données sur la socket, déconnexion du " diff --git a/po/hu.po b/po/hu.po index e3950e0a9..b6667bed5 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-09-19 10:52+0200\n" +"POT-Creation-Date: 2009-09-30 17:39+0200\n" "PO-Revision-Date: 2009-09-20 13:51+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -2266,18 +2266,14 @@ msgstr "%s nincs elég memória az információs pult üzenethez\n" msgid "Alias \"%s\" => \"%s\" created" msgstr "A \"%s\" => \"%s\" aliasz elkészült\n" -#, fuzzy -msgid "Alias:" -msgstr "Aliasz:\n" - -#, fuzzy -msgid "No alias found" -msgstr "Nem találtam aliaszt.\n" - #, fuzzy msgid "List of aliases:" msgstr "Aliaszok listája:\n" +#, fuzzy, c-format +msgid "No alias found matching \"%s\"" +msgstr "Nem található '%s' szerver.\n" + #, fuzzy msgid "No alias defined" msgstr "Nincs aliasz definiálva.\n" @@ -2298,7 +2294,7 @@ msgstr "[alias_név [parancs [paraméterek]]]" #, fuzzy msgid "" -"alias_name: name of alias\n" +"alias_name: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name (many commands can be separated by semicolons)\n" " arguments: arguments for command\n" "\n" @@ -5573,6 +5569,14 @@ msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" +#, fuzzy +#~ msgid "Alias:" +#~ msgstr "Aliasz:\n" + +#, fuzzy +#~ msgid "No alias found" +#~ msgstr "Nem találtam aliaszt.\n" + #, fuzzy #~ msgid "%s%s: error sending data to IRC server (%s)" #~ msgstr "%s adatküldési hiba az IRC szerveren\n" diff --git a/po/pl.po b/po/pl.po index 8e1506866..5f5a19ab7 100644 --- a/po/pl.po +++ b/po/pl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-09-19 10:52+0200\n" +"POT-Creation-Date: 2009-09-30 17:39+0200\n" "PO-Revision-Date: 2009-09-06 21:25+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: Polish\n" @@ -2356,15 +2356,13 @@ msgstr "%s%s: błąd podczas tworzenia aliasu \"%s\" => \"%s\"" msgid "Alias \"%s\" => \"%s\" created" msgstr "Utworzono alias \"%s\" => \"%s\" " -msgid "Alias:" -msgstr "Alias:" - -msgid "No alias found" -msgstr "Nie znaleziono żadnego aliasu" - msgid "List of aliases:" msgstr "Lista aliasów:" +#, fuzzy, c-format +msgid "No alias found matching \"%s\"" +msgstr "Nie znaleziono serwera z \"%s\"" + msgid "No alias defined" msgstr "Nie zdefiniowano aliasu" @@ -2382,8 +2380,9 @@ msgstr "tworzy alias do komendy" msgid "[alias_name [command [arguments]]]" msgstr "[nazwa_aliasu [komenda [argumenty]]]" +#, fuzzy msgid "" -"alias_name: name of alias\n" +"alias_name: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name (many commands can be separated by semicolons)\n" " arguments: arguments for command\n" "\n" @@ -5681,6 +5680,12 @@ msgstr "%s%s: nie można ustawić opcji \"nonblock\" dla gniazda" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: przekroczono czas na \"%s\" z %s" +#~ msgid "Alias:" +#~ msgstr "Alias:" + +#~ msgid "No alias found" +#~ msgstr "Nie znaleziono żadnego aliasu" + #~ msgid "%s%s: cannot read data from socket, disconnecting from server..." #~ msgstr "%s%s: nie można odczytać danych z gniazda, rozłączam z serwerem..." diff --git a/po/ru.po b/po/ru.po index 7bc56a2b4..15680eb4f 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-09-19 10:52+0200\n" +"POT-Creation-Date: 2009-09-30 17:39+0200\n" "PO-Revision-Date: 2009-09-20 13:50+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -2279,18 +2279,14 @@ msgstr "%s недостаточно памяти для сообщения в с msgid "Alias \"%s\" => \"%s\" created" msgstr "Сокращение \"%s\" => \"%s\" создано\n" -#, fuzzy -msgid "Alias:" -msgstr "Сокращение:\n" - -#, fuzzy -msgid "No alias found" -msgstr "Сокращения не найдены.\n" - #, fuzzy msgid "List of aliases:" msgstr "Список сокращений:\n" +#, fuzzy, c-format +msgid "No alias found matching \"%s\"" +msgstr "Серверы с '%s' не найдены.\n" + #, fuzzy msgid "No alias defined" msgstr "Сокращения не заданы.\n" @@ -2311,7 +2307,7 @@ msgstr "[сокращение [команда [аргументы]]]" #, fuzzy msgid "" -"alias_name: name of alias\n" +"alias_name: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name (many commands can be separated by semicolons)\n" " arguments: arguments for command\n" "\n" @@ -5570,6 +5566,14 @@ msgstr "%s DCC: не могу установить неблокирующий р msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s нет аргумента для параметра \"%s\"\n" +#, fuzzy +#~ msgid "Alias:" +#~ msgstr "Сокращение:\n" + +#, fuzzy +#~ msgid "No alias found" +#~ msgstr "Сокращения не найдены.\n" + #, fuzzy #~ msgid "%s%s: error sending data to IRC server (%s)" #~ msgstr "%s ошибка при отправке данных IRC серверу\n" diff --git a/po/weechat.pot b/po/weechat.pot index 7de602609..efc700ec1 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: 2009-09-19 10:52+0200\n" +"POT-Creation-Date: 2009-09-30 17:39+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1937,15 +1937,13 @@ msgstr "" msgid "Alias \"%s\" => \"%s\" created" msgstr "" -msgid "Alias:" -msgstr "" - -msgid "No alias found" -msgstr "" - msgid "List of aliases:" msgstr "" +#, c-format +msgid "No alias found matching \"%s\"" +msgstr "" + msgid "No alias defined" msgstr "" @@ -1964,7 +1962,7 @@ msgid "[alias_name [command [arguments]]]" msgstr "" msgid "" -"alias_name: name of alias\n" +"alias_name: name of alias (can start or end with \"*\" for alias listing)\n" " command: command name (many commands can be separated by semicolons)\n" " arguments: arguments for command\n" "\n" diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index d0aa7ca0a..9413109fe 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -708,6 +708,7 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc, char *alias_name; struct t_alias *ptr_alias; struct t_config_option *ptr_option; + int alias_found; /* make C compiler happy */ (void) data; @@ -749,21 +750,31 @@ alias_command_cb (void *data, struct t_gui_buffer *buffer, int argc, } else { - /* Display one alias */ - ptr_alias = alias_search (alias_name); - if (ptr_alias) - { - weechat_printf (NULL, ""); - weechat_printf (NULL, _("Alias:")); - weechat_printf (NULL, " %s %s=>%s %s", - ptr_alias->name, - weechat_color ("chat_delimiters"), - weechat_color ("chat"), - ptr_alias->command); - } - else - weechat_printf (NULL, - _("No alias found")); + /* Display list of aliases */ + alias_found = 0; + for (ptr_alias = alias_list; ptr_alias; + ptr_alias = ptr_alias->next_alias) + { + if (weechat_string_match (ptr_alias->name, alias_name, 0)) + { + if (!alias_found) + { + weechat_printf (NULL, ""); + weechat_printf (NULL, _("List of aliases:")); + } + weechat_printf (NULL, " %s %s=>%s %s", + ptr_alias->name, + weechat_color ("chat_delimiters"), + weechat_color ("chat"), + ptr_alias->command); + alias_found = 1; + } + } + if (!alias_found) + { + weechat_printf (NULL, _("No alias found matching \"%s\""), + alias_name); + } } } else @@ -918,7 +929,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_hook_command ("alias", N_("create an alias for a command"), N_("[alias_name [command [arguments]]]"), - N_("alias_name: name of alias\n" + N_("alias_name: name of alias (can start or end with " + "\"*\" for alias listing)\n" " command: command name (many commands can be " "separated by semicolons)\n" " arguments: arguments for command\n\n"