diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 72f6da071..fa82984b3 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele New features:: + * core: add option `-s` in command `/command` to execute multiple commands separated by semicolons * core: allow case insensitive search of partial buffer name with `(?i)name` in command `/buffer` * core: use function util_strftimeval in evaluation of expression `date:xxx` * api: add support of specifier `%!` for timestamp in function util_strftimeval diff --git a/po/cs.po b/po/cs.po index 69d5a9870..9d683b12d 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: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -1518,7 +1518,9 @@ msgid "launch explicit WeeChat or plugin command" msgstr "pustit uvedený WeeChat nebo plugin příkaz" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated -msgid "[-buffer ] " +#, fuzzy +#| msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "[-buffer ] " #, fuzzy @@ -1541,6 +1543,12 @@ msgid "" "beginning of command)" msgstr "" +#, fuzzy +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "příkaz spuštěný při startu WeeChat, po načtení pluginů" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/de.po b/po/de.po index 13fc76d9e..67949147f 100644 --- a/po/de.po +++ b/po/de.po @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2024-01-27 14:34+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -1598,7 +1598,9 @@ msgid "launch explicit WeeChat or plugin command" msgstr "führe explizit einen WeeChat Befehl oder eine Erweiterung aus" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated -msgid "[-buffer ] " +#, fuzzy +#| msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "[-buffer ] " msgid "raw[-buffer]: execute the command on this buffer" @@ -1620,6 +1622,17 @@ msgstr "" "command: auszuführender Befehl (es wird automatisch ein '/' vorangestellt, " "falls dieser nicht angegeben wurde)" +#, fuzzy +#| msgid "" +#| "raw[-s]: split expression before evaluating it (many commands can be " +#| "separated by semicolons)" +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" +"raw[-s]: teilt Ausdrücke, bevor sie evaluiert werden (mehrere Befehle können " +"durch Semikolon getrennt werden)" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/es.po b/po/es.po index 7dfcfb3cc..f9ea52506 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: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -1595,7 +1595,9 @@ msgid "launch explicit WeeChat or plugin command" msgstr "lanza explícitamente un comando de WeeChat o un comando de plugin" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated -msgid "[-buffer ] " +#, fuzzy +#| msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "[-buffer ] " #, fuzzy @@ -1618,6 +1620,12 @@ msgid "" "beginning of command)" msgstr "" +#, fuzzy +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "comando ejecutado cuando WeeChat inicia, después de cargar los plugins" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/fr.po b/po/fr.po index c11773c5a..a8be0a27c 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: 2024-02-11 08:54+0100\n" -"PO-Revision-Date: 2024-02-11 08:55+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" +"PO-Revision-Date: 2024-02-11 21:45+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -1575,8 +1575,9 @@ msgid "launch explicit WeeChat or plugin command" msgstr "lancer explicitement une commande WeeChat ou d'une extension" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated -msgid "[-buffer ] " -msgstr "[-buffer ] " +msgid "[-buffer ] || -s [;...]" +msgstr "" +"[-buffer ] || -s [;...]" msgid "raw[-buffer]: execute the command on this buffer" msgstr "raw[-buffer] : exécuter la commande sur ce tampon" @@ -1597,6 +1598,13 @@ msgstr "" "commande : commande à exécuter (un \"/\" est automatiquement ajouté s'il " "n'est pas trouvé au début de la commande)" +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" +"raw[-s] : exécuter une ou plusieurs commandes séparées par des points-" +"virgules (le point-virgule peut être échappé avec \"\\;\")" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/hu.po b/po/hu.po index e87b600d9..ee655f238 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: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1458,7 +1458,7 @@ msgstr "" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated #, fuzzy -msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "Modul parancsok:\n" #, fuzzy @@ -1479,6 +1479,12 @@ msgid "" "beginning of command)" msgstr "" +#, fuzzy +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "felhasználónév az IRC szerveren" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/it.po b/po/it.po index e9b584516..0c7bceeb2 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: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -1487,7 +1487,7 @@ msgstr "esegui comando o plugin di WeeChat esplicito" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated #, fuzzy -msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr " " #, fuzzy @@ -1510,6 +1510,14 @@ msgid "" "beginning of command)" msgstr "" +#, fuzzy +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" +"comando eseguito all'avvio di WeeChat, dopo il caricamento dei plugin (nota: " +"il contenuto viene valutato, consultare /help eval)" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/ja.po b/po/ja.po index 7a0a608c3..2cdcda1d8 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: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese ") must be translated -msgid "[-buffer ] " +#, fuzzy +#| msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "[-buffer ] " #, fuzzy @@ -1583,6 +1585,17 @@ msgid "" "beginning of command)" msgstr "" +#, fuzzy +#| msgid "" +#| "command(s) to run if conditions are OK, after regex replacements (many " +#| "commands can be separated by semicolons)" +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" +"正規表現置換が行われた後に条件が満足された場合に実行するコマンド (多くのコマ" +"ンドを実行するにはセミコロンで区切ってください)" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/pl.po b/po/pl.po index 92b1a8fd9..00e566047 100644 --- a/po/pl.po +++ b/po/pl.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2024-01-31 21:16+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -1554,7 +1554,9 @@ msgid "launch explicit WeeChat or plugin command" msgstr "wywołaj wyraźnie komendę WeeChat lub wtyczki" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated -msgid "[-buffer ] " +#, fuzzy +#| msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "[-buffer ] " msgid "raw[-buffer]: execute the command on this buffer" @@ -1575,6 +1577,17 @@ msgstr "" "komenda: komenda do wywołania („/” jest automatycznie dodawane jeśli nie " "występuje na początku komendy)" +#, fuzzy +#| msgid "" +#| "raw[-s]: split expression before evaluating it (many commands can be " +#| "separated by semicolons)" +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" +"raw[-s]: podziel wyrażenie przed ewaluacją (wiele komend można oddzielić " +"średnikami)" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/pt.po b/po/pt.po index 512c6672f..2858d2087 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -1542,7 +1542,9 @@ msgid "launch explicit WeeChat or plugin command" msgstr "lançar explicitamente um comando do WeeChat ou de um plugin" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated -msgid "[-buffer ] " +#, fuzzy +#| msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "[-buffer ] " #, fuzzy @@ -1575,6 +1577,17 @@ msgid "" "beginning of command)" msgstr "" +#, fuzzy +#| msgid "" +#| "command(s) to run if conditions are OK, after regex replacements (many " +#| "commands can be separated by semicolons)" +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" +"comandos a executar se as condições estiverem bem, depois de substituir as " +"expressões regulares (pode separar vários comandos por ponto e vírgula)" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/pt_BR.po b/po/pt_BR.po index 3c83ec2e4..af578dd1b 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: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2023-10-20 13:11+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -1528,7 +1528,7 @@ msgstr "executar explicitamente um comando do WeeChat ou de um plugin" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated #, fuzzy -msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr " " #, fuzzy @@ -1552,6 +1552,14 @@ msgid "" "beginning of command)" msgstr "" +#, fuzzy +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" +"comando executado quando o WeeChat inicia, após o carregamento dos plugins " +"(nota: o conteúdo é avaliado, veja /help eval)" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/ru.po b/po/ru.po index 8b2fb87d3..b867cb741 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: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -1481,7 +1481,7 @@ msgstr "" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated #, fuzzy -msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "Команды Plugin'ов:\n" #, fuzzy @@ -1502,6 +1502,12 @@ msgid "" "beginning of command)" msgstr "" +#, fuzzy +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "ник, используемый на IRC сервере" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/sr.po b/po/sr.po index 813bdc350..973eb04c8 100644 --- a/po/sr.po +++ b/po/sr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2024-01-15 10:23+0400\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -1543,7 +1543,9 @@ msgid "launch explicit WeeChat or plugin command" msgstr "покреће експлицитну WeeChat или команду додатка" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated -msgid "[-buffer ] " +#, fuzzy +#| msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "[-buffer <име>] <додатак> <команда>" msgid "raw[-buffer]: execute the command on this buffer" @@ -1564,6 +1566,17 @@ msgstr "" "команда: команда која се извршава (аутоматски се додаје „/” ако се не наведе " "на почетку команде)" +#, fuzzy +#| msgid "" +#| "raw[-s]: split expression before evaluating it (many commands can be " +#| "separated by semicolons)" +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" +"raw[-s]: дели израз пре израчунавања (многе команде могу да се раздвоје са " +"тачка запетама)" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/tr.po b/po/tr.po index 493a6d949..79c3c8190 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: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2023-11-29 09:59+0100\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -1576,7 +1576,9 @@ msgid "launch explicit WeeChat or plugin command" msgstr "açık WeeChat veya eklenti komutu çalıştır" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated -msgid "[-buffer ] " +#, fuzzy +#| msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "[-buffer ] " #, fuzzy @@ -1608,6 +1610,17 @@ msgid "" "beginning of command)" msgstr "" +#, fuzzy +#| msgid "" +#| "command(s) to run if conditions are OK, after regex replacements (many " +#| "commands can be separated by semicolons)" +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" +"düzenli ifade değiştirmelerinden sonra koşullar sağlanırsa çalıştırılacak " +"komutlar (birden çok komut noktalı virgül ile ayrılabilir)" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/po/weechat.pot b/po/weechat.pot index b95b574eb..7b5eb4258 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: 2024-02-11 08:54+0100\n" +"POT-Creation-Date: 2024-02-11 21:44+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -1362,7 +1362,7 @@ msgid "launch explicit WeeChat or plugin command" msgstr "" #. TRANSLATORS: only text between angle brackets (eg: "") must be translated -msgid "[-buffer ] " +msgid "[-buffer ] || -s [;...]" msgstr "" msgid "raw[-buffer]: execute the command on this buffer" @@ -1379,6 +1379,11 @@ msgid "" "beginning of command)" msgstr "" +msgid "" +"raw[-s]: execute one or multiple commands separated by semicolons (the " +"semicolon can be escaped with \"\\;\")" +msgstr "" + msgid "" "free movement of cursor on screen to execute actions on specific areas of " "screen" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index e3331c3c1..876a8eee8 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -1811,8 +1811,8 @@ COMMAND_CALLBACK(color) COMMAND_CALLBACK(command) { - int length, index_args, any_plugin; - char *command; + int i, length, index_args, any_plugin; + char *command, **commands; struct t_weechat_plugin *ptr_plugin; struct t_gui_buffer *ptr_buffer; @@ -1827,6 +1827,20 @@ COMMAND_CALLBACK(command) any_plugin = 0; ptr_plugin = NULL; + if (string_strcmp (argv[1], "-s") == 0) + { + commands = string_split_command (argv_eol[2], ';'); + if (commands) + { + for (i = 0; commands[i]; i++) + { + (void) input_data (buffer, commands[i], NULL, 0); + } + string_free_split_command (commands); + } + return WEECHAT_RC_OK; + } + if ((argc >= 5) && (string_strcmp (argv[1], "-buffer") == 0)) { ptr_buffer = gui_buffer_search_by_full_name (argv[2]); @@ -8103,16 +8117,20 @@ command_init () NULL, "50000|command", N_("launch explicit WeeChat or plugin command"), /* TRANSLATORS: only text between angle brackets (eg: "") must be translated */ - N_("[-buffer ] "), + N_("[-buffer ] " + " || -s [;...]"), CMD_ARGS_DESC( N_("raw[-buffer]: execute the command on this buffer"), N_("plugin: execute the command from this plugin; \"core\" for a " "WeeChat command, \"*\" for automatic plugin (it depends on the " "buffer where the command is executed)"), N_("command: command to execute (a \"/\" is automatically added if not " - "found at beginning of command)")), + "found at beginning of command)"), + N_("raw[-s]: execute one or multiple commands separated by semicolons " + "(the semicolon can be escaped with \"\\;\")")), "-buffer %(buffers_plugins_names) " "%(plugins_names)|" PLUGIN_CORE " %(plugins_commands:/)" + " || -s" " || %(plugins_names)|" PLUGIN_CORE " %(plugins_commands:/)", &command_command, NULL, NULL); hook_command (