core: allow text in addition to a command in command /repeat
parent
8251f1fd13
commit
b3cf270d1d
|
@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
|||
|
||||
New features::
|
||||
|
||||
* core: allow text in addition to a command in command /repeat
|
||||
* core: add option "addreplace" in command /filter (issue #1055, issue #1312)
|
||||
* api: replace argument "keep_eol" by "flags" in function string_split (issue #1322)
|
||||
* api: add function command_options (issue #928)
|
||||
|
|
|
@ -757,14 +757,14 @@ Ohne Angabe von Argumenten werden alle Konfigurationen (WeeChat und Erweiterunge
|
|||
----
|
||||
/repeat [-interval <delay>] <count> <command>
|
||||
|
||||
delay: Verzögerung zwischen dem Ausführen der Befehle (in Millisekunden)
|
||||
count: Anzahl wie oft der Befehl ausgeführt werden soll
|
||||
command: Befehl welcher ausgeführt werden soll (das Befehlszeichen '/' wird automatisch hinzugefügt, falls es zum Befehlsbeginn nicht gefunden werden sollte)
|
||||
delay: delay between execution of commands (in milliseconds)
|
||||
count: number of times to execute command
|
||||
command: command to execute (or text to send to buffer if command does not start with '/')
|
||||
|
||||
Alle Befehle werden in dem Buffer ausgeführt, in welchem dieser Befehl genutzt wird.
|
||||
All commands are executed on buffer where this command was issued.
|
||||
|
||||
Beispiel:
|
||||
scrolle zwei Seiten hoch:
|
||||
Example:
|
||||
scroll 2 pages up:
|
||||
/repeat 2 /window page_up
|
||||
----
|
||||
|
||||
|
|
|
@ -759,7 +759,7 @@ Without argument, all files (WeeChat and plugins) are reloaded.
|
|||
|
||||
delay: delay between execution of commands (in milliseconds)
|
||||
count: number of times to execute command
|
||||
command: command to execute (a '/' is automatically added if not found at beginning of command)
|
||||
command: command to execute (or text to send to buffer if command does not start with '/')
|
||||
|
||||
All commands are executed on buffer where this command was issued.
|
||||
|
||||
|
|
|
@ -759,7 +759,7 @@ Sans paramètre, tous les fichiers (WeeChat et extensions) sont rechargés.
|
|||
|
||||
délai : délai entre l'exécution des commandes (en millisecondes)
|
||||
nombre : nombre de fois que la commande sera exécutée
|
||||
commande : commande à exécuter (un '/' est automatiquement ajouté s'il n'est pas trouvé au début de la commande)
|
||||
commande : commande à exécuter (ou texte à envoyer au tampon si la commande ne commence pas par '/')
|
||||
|
||||
Toutes les commandes sont exécutées sur le tampon où la commande a été lancée.
|
||||
|
||||
|
|
|
@ -757,14 +757,14 @@ Senza argomento, vengono ricaricati tutti i file (WeeChat e plugin).
|
|||
----
|
||||
/repeat [-interval <ritardo>] <numero> <comando>
|
||||
|
||||
ritardo: ritardo tra l'esecuzione dei comandi (in millisecondi)
|
||||
numero: numero di volte in cui eseguire il comando
|
||||
comando: comando da eseguire (una '/' viene aggiunta automaticamente se non viene trovata all'inizio del comando)
|
||||
delay: delay between execution of commands (in milliseconds)
|
||||
count: number of times to execute command
|
||||
command: command to execute (or text to send to buffer if command does not start with '/')
|
||||
|
||||
Tutti i comandi sono eseguiti sul buffer su cui viene dato il comando.
|
||||
All commands are executed on buffer where this command was issued.
|
||||
|
||||
Esempio:
|
||||
scorre due pagine in alto:
|
||||
Example:
|
||||
scroll 2 pages up:
|
||||
/repeat 2 /window page_up
|
||||
----
|
||||
|
||||
|
|
|
@ -757,14 +757,14 @@ file: リロードする設定ファイル (拡張子 ".conf" は不要)
|
|||
----
|
||||
/repeat [-interval <delay>] <count> <command>
|
||||
|
||||
delay: コマンドの実行間隔 (ミリ秒単位)
|
||||
count: コマンドの実行回数
|
||||
command: 実行するコマンド (最初に '/' が無い場合は自動的に追加されます)
|
||||
delay: delay between execution of commands (in milliseconds)
|
||||
count: number of times to execute command
|
||||
command: command to execute (or text to send to buffer if command does not start with '/')
|
||||
|
||||
全てのコマンドはこのコマンドが発行されたバッファで実行されます。
|
||||
All commands are executed on buffer where this command was issued.
|
||||
|
||||
例:
|
||||
2 ページ分上方向にスクロール:
|
||||
Example:
|
||||
scroll 2 pages up:
|
||||
/repeat 2 /window page_up
|
||||
----
|
||||
|
||||
|
|
|
@ -757,14 +757,14 @@ Bez podania argumentu wszystkie pliki (WeeChat oraz wtyczki) zostaną przeładow
|
|||
----
|
||||
/repeat [-interval <opóźnienie>] <ilość> <komenda>
|
||||
|
||||
opóźnienie: czas pomiędzy wykonaniem komend (w milisekundach)
|
||||
ilość: ile razy wykonać komendę
|
||||
komenda: komenda do wykonania ('/' jest automatycznie dodawane, jeśli nie znajduje się na początku komendy)
|
||||
delay: delay between execution of commands (in milliseconds)
|
||||
count: number of times to execute command
|
||||
command: command to execute (or text to send to buffer if command does not start with '/')
|
||||
|
||||
Wszystkie komendy wykonane zostaną na buforze, w którym wykonano tą komendę.
|
||||
All commands are executed on buffer where this command was issued.
|
||||
|
||||
Przykład:
|
||||
przewija 2 strony do góry:
|
||||
Example:
|
||||
scroll 2 pages up:
|
||||
/repeat 2 /window page_up
|
||||
----
|
||||
|
||||
|
|
6
po/cs.po
6
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: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-17 18:32+0100\n"
|
||||
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -2296,8 +2296,8 @@ msgstr "[-interval <zpoždění>] <počet> <příkaz>"
|
|||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
7
po/de.po
7
po/de.po
|
@ -24,7 +24,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-21 23:31+0100\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <kde-i18n-de@kde.org>\n"
|
||||
|
@ -2722,11 +2722,12 @@ msgstr "führt einen Befehl mehrfach aus"
|
|||
msgid "[-interval <delay>] <count> <command>"
|
||||
msgstr "[-interval <delay>] <count> <command>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
7
po/es.po
7
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: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-17 16:04+0100\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -2394,11 +2394,12 @@ msgstr "ejecuta un comando varias veces"
|
|||
msgid "[-interval <delay>] <count> <command>"
|
||||
msgstr "[-interval <retraso>] <cantidad> <omando>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
12
po/fr.po
12
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: 2019-03-21 23:30+0100\n"
|
||||
"PO-Revision-Date: 2019-03-21 23:31+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-29 08:37+0100\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
|
@ -2657,8 +2657,8 @@ msgstr "[-interval <délai>] <nombre> <commande>"
|
|||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
@ -2668,8 +2668,8 @@ msgid ""
|
|||
msgstr ""
|
||||
" délai : délai entre l'exécution des commandes (en millisecondes)\n"
|
||||
" nombre : nombre de fois que la commande sera exécutée\n"
|
||||
"commande : commande à exécuter (un '/' est automatiquement ajouté s'il n'est "
|
||||
"pas trouvé au début de la commande)\n"
|
||||
"commande : commande à exécuter (ou texte à envoyer au tampon si la commande "
|
||||
"ne commence pas par '/')\n"
|
||||
"\n"
|
||||
"Toutes les commandes sont exécutées sur le tampon où la commande a été "
|
||||
"lancée.\n"
|
||||
|
|
6
po/hu.po
6
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: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-02-28 20:18+0100\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -2035,8 +2035,8 @@ msgstr ""
|
|||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
7
po/it.po
7
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: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-17 16:04+0100\n"
|
||||
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -2437,11 +2437,12 @@ msgstr "esegue un comando più volte"
|
|||
msgid "[-interval <delay>] <count> <command>"
|
||||
msgstr "[-interval <ritardo>] <numero> <comando>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
7
po/ja.po
7
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: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-21 23:32+0100\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
|
||||
|
@ -2580,11 +2580,12 @@ msgstr "複数回コマンドを実行"
|
|||
msgid "[-interval <delay>] <count> <command>"
|
||||
msgstr "[-interval <delay>] <count> <command>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
7
po/pl.po
7
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: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-21 23:32+0100\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
|
||||
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
|
||||
|
@ -2631,11 +2631,12 @@ msgstr "wykonuje komendę kilka razy"
|
|||
msgid "[-interval <delay>] <count> <command>"
|
||||
msgstr "[-interval <opóźnienie>] <ilość> <komenda>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
7
po/pt.po
7
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: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-21 23:33+0100\n"
|
||||
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
|
||||
"Language-Team: Portuguese <>\n"
|
||||
|
@ -2587,11 +2587,12 @@ msgstr "executar um comando várias vezes"
|
|||
msgid "[-interval <delay>] <count> <command>"
|
||||
msgstr "[-interval <atraso>] <vezes> <comando>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
|
@ -21,7 +21,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-11 21:10+0100\n"
|
||||
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -2420,11 +2420,12 @@ msgstr "executa um comando várias vezes"
|
|||
msgid "[-interval <delay>] <count> <command>"
|
||||
msgstr "[-interval <tempo_de_espera>] <contador> <comandos>"
|
||||
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
6
po/ru.po
6
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: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-11 21:10+0100\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -2058,8 +2058,8 @@ msgstr ""
|
|||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
6
po/tr.po
6
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: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
|
||||
"PO-Revision-Date: 2019-03-17 16:04+0100\n"
|
||||
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
|
@ -1855,8 +1855,8 @@ msgstr ""
|
|||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
|
@ -21,7 +21,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2019-03-21 23:30+0100\n"
|
||||
"POT-Creation-Date: 2019-03-29 07:53+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"
|
||||
|
@ -1854,8 +1854,8 @@ msgstr ""
|
|||
msgid ""
|
||||
" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not found at "
|
||||
"beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command does not "
|
||||
"start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
|
@ -5228,8 +5228,7 @@ command_repeat_timer_cb (const void *pointer, void *data, int remaining_calls)
|
|||
|
||||
/* execute command */
|
||||
if (ptr_buffer)
|
||||
(void) input_exec_command (ptr_buffer, 1, NULL, repeat_args[1],
|
||||
repeat_args[2]);
|
||||
(void) input_data (ptr_buffer, repeat_args[1], repeat_args[2]);
|
||||
}
|
||||
|
||||
if (remaining_calls == 0)
|
||||
|
@ -5251,8 +5250,8 @@ command_repeat_timer_cb (const void *pointer, void *data, int remaining_calls)
|
|||
|
||||
COMMAND_CALLBACK(repeat)
|
||||
{
|
||||
int arg_count, count, interval, length, i;
|
||||
char *error, *command, **repeat_args;
|
||||
int arg_count, count, interval, i;
|
||||
char *error, **repeat_args;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
|
@ -5283,52 +5282,39 @@ COMMAND_CALLBACK(repeat)
|
|||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
if (string_is_command_char (argv_eol[arg_count + 1]))
|
||||
command = strdup (argv_eol[arg_count + 1]);
|
||||
else
|
||||
{
|
||||
length = strlen (argv_eol[arg_count + 1]) + 2;
|
||||
command = malloc (length);
|
||||
if (command)
|
||||
snprintf (command, length, "/%s", argv_eol[arg_count + 1]);
|
||||
}
|
||||
/* first execute command now */
|
||||
(void) input_data (buffer, argv_eol[arg_count + 1], NULL);
|
||||
|
||||
if (command)
|
||||
/* repeat execution of command */
|
||||
if (count > 1)
|
||||
{
|
||||
(void) input_exec_command (buffer, 1, NULL, command, NULL);
|
||||
if (count > 1)
|
||||
if (interval == 0)
|
||||
{
|
||||
if (interval == 0)
|
||||
/* execute command multiple times now */
|
||||
for (i = 0; i < count - 1; i++)
|
||||
{
|
||||
for (i = 0; i < count - 1; i++)
|
||||
{
|
||||
(void) input_exec_command (buffer, 1, NULL, command, NULL);
|
||||
}
|
||||
free (command);
|
||||
}
|
||||
else
|
||||
{
|
||||
repeat_args = malloc (3 * sizeof (*repeat_args));
|
||||
if (!repeat_args)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sNot enough memory (%s)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
"/repeat");
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
repeat_args[0] = strdup (buffer->full_name);
|
||||
repeat_args[1] = command;
|
||||
repeat_args[2] = (input_commands_allowed) ?
|
||||
string_build_with_split_string (
|
||||
(const char **)input_commands_allowed, ",") : NULL;
|
||||
hook_timer (NULL, interval, 0, count - 1,
|
||||
&command_repeat_timer_cb, repeat_args, NULL);
|
||||
(void) input_data (buffer, argv_eol[arg_count + 1], NULL);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
free (command);
|
||||
/* schedule execution of command in future */
|
||||
repeat_args = malloc (3 * sizeof (*repeat_args));
|
||||
if (!repeat_args)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
_("%sNot enough memory (%s)"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
"/repeat");
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
repeat_args[0] = strdup (buffer->full_name);
|
||||
repeat_args[1] = strdup (argv_eol[arg_count + 1]);
|
||||
repeat_args[2] = (input_commands_allowed) ?
|
||||
string_build_with_split_string (
|
||||
(const char **)input_commands_allowed, ",") : NULL;
|
||||
hook_timer (NULL, interval, 0, count - 1,
|
||||
&command_repeat_timer_cb, repeat_args, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7963,8 +7949,8 @@ command_init ()
|
|||
N_("[-interval <delay>] <count> <command>"),
|
||||
N_(" delay: delay between execution of commands (in milliseconds)\n"
|
||||
" count: number of times to execute command\n"
|
||||
"command: command to execute (a '/' is automatically added if not "
|
||||
"found at beginning of command)\n"
|
||||
"command: command to execute (or text to send to buffer if command "
|
||||
"does not start with '/')\n"
|
||||
"\n"
|
||||
"All commands are executed on buffer where this command was issued.\n"
|
||||
"\n"
|
||||
|
|
Loading…
Reference in New Issue