core: use seconds by default in /repeat interval, allow unit for the interval

v2.8-utf8proc
Sébastien Helleu 2019-03-29 20:31:19 +01:00
parent fa5b1eed77
commit f1d18f4c26
21 changed files with 180 additions and 63 deletions

View File

@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
New features::
* core: use seconds by default in /repeat interval, allow unit for the interval
* 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)

View File

@ -755,9 +755,14 @@ Ohne Angabe von Argumenten werden alle Konfigurationen (WeeChat und Erweiterunge
* `+repeat+`: führt einen Befehl mehrfach aus
----
/repeat [-interval <delay>] <count> <command>
/repeat [-interval <delay>[<unit>]] <count> <command>
delay: delay between execution of commands (in milliseconds)
delay: delay between execution of commands
unit: optional, values are:
ms: milliseconds
s: seconds (default)
m: minutes
h: hours
count: number of times to execute command
command: command to execute (or text to send to buffer if command does not start with '/')

View File

@ -755,9 +755,14 @@ Without argument, all files (WeeChat and plugins) are reloaded.
* `+repeat+`: execute a command several times
----
/repeat [-interval <delay>] <count> <command>
/repeat [-interval <delay>[<unit>]] <count> <command>
delay: delay between execution of commands (in milliseconds)
delay: delay between execution of commands
unit: optional, values are:
ms: milliseconds
s: seconds (default)
m: minutes
h: hours
count: number of times to execute command
command: command to execute (or text to send to buffer if command does not start with '/')

View File

@ -755,9 +755,14 @@ Sans paramètre, tous les fichiers (WeeChat et extensions) sont rechargés.
* `+repeat+`: exécuter une commande plusieurs fois
----
/repeat [-interval <délai>] <nombre> <commande>
/repeat [-interval <délai>[<unité>]] <nombre> <commande>
délai : délai entre l'exécution des commandes (en millisecondes)
délai : délai entre l'exécution des commandes
unité : optionnelle, valeurs possibles :
ms : millisecondes
s : secondes (par défaut)
m : minutes
h : heures
nombre : nombre de fois que la commande sera exécutée
commande : commande à exécuter (ou texte à envoyer au tampon si la commande ne commence pas par '/')

View File

@ -755,9 +755,14 @@ Senza argomento, vengono ricaricati tutti i file (WeeChat e plugin).
* `+repeat+`: esegue un comando più volte
----
/repeat [-interval <ritardo>] <numero> <comando>
/repeat [-interval <delay>[<unit>]] <count> <command>
delay: delay between execution of commands (in milliseconds)
delay: delay between execution of commands
unit: optional, values are:
ms: milliseconds
s: seconds (default)
m: minutes
h: hours
count: number of times to execute command
command: command to execute (or text to send to buffer if command does not start with '/')

View File

@ -755,9 +755,14 @@ file: リロードする設定ファイル (拡張子 ".conf" は不要)
* `+repeat+`: 複数回コマンドを実行
----
/repeat [-interval <delay>] <count> <command>
/repeat [-interval <delay>[<unit>]] <count> <command>
delay: delay between execution of commands (in milliseconds)
delay: delay between execution of commands
unit: optional, values are:
ms: milliseconds
s: seconds (default)
m: minutes
h: hours
count: number of times to execute command
command: command to execute (or text to send to buffer if command does not start with '/')

View File

@ -755,9 +755,14 @@ Bez podania argumentu wszystkie pliki (WeeChat oraz wtyczki) zostaną przeładow
* `+repeat+`: wykonuje komendę kilka razy
----
/repeat [-interval <opóźnienie>] <ilość> <komenda>
/repeat [-interval <delay>[<unit>]] <count> <command>
delay: delay between execution of commands (in milliseconds)
delay: delay between execution of commands
unit: optional, values are:
ms: milliseconds
s: seconds (default)
m: minutes
h: hours
count: number of times to execute command
command: command to execute (or text to send to buffer if command does not start with '/')

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -2289,12 +2289,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "vykonat příkaz v tichosti"
msgid "[-interval <delay>] <count> <command>"
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "[-interval <zpoždění>] <počet> <příkaz>"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -2719,12 +2719,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "führt einen Befehl mehrfach aus"
msgid "[-interval <delay>] <count> <command>"
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "[-interval <delay>] <count> <command>"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -2391,12 +2391,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "ejecuta un comando varias veces"
msgid "[-interval <delay>] <count> <command>"
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "[-interval <retraso>] <cantidad> <omando>"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"PO-Revision-Date: 2019-03-29 08:37+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+0100\n"
"PO-Revision-Date: 2019-03-29 20:30+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -2651,11 +2651,16 @@ msgstr ""
msgid "execute a command several times"
msgstr "exécuter une commande plusieurs fois"
msgid "[-interval <delay>] <count> <command>"
msgstr "[-interval <délai>] <nombre> <commande>"
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "[-interval <délai>[<unité>]] <nombre> <commande>"
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"
@ -2666,7 +2671,12 @@ msgid ""
" scroll 2 pages up:\n"
" /repeat 2 /window page_up"
msgstr ""
" délai : délai entre l'exécution des commandes (en millisecondes)\n"
" délai : délai entre l'exécution des commandes\n"
" unité : optionnelle, valeurs possibles :\n"
" ms : millisecondes\n"
" s : secondes (par défaut)\n"
" m : minutes\n"
" h : heures\n"
" nombre : nombre de fois que la commande sera exécutée\n"
"commande : commande à exécuter (ou texte à envoyer au tampon si la commande "
"ne commence pas par '/')\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -2028,12 +2028,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "%s belső parancsok:\n"
msgid "[-interval <delay>] <count> <command>"
msgstr ""
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "Modul parancsok:\n"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -2434,12 +2434,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "esegue un comando più volte"
msgid "[-interval <delay>] <count> <command>"
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "[-interval <ritardo>] <numero> <comando>"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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/"
@ -2577,12 +2577,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "複数回コマンドを実行"
msgid "[-interval <delay>] <count> <command>"
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "[-interval <delay>] <count> <command>"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -2628,12 +2628,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "wykonuje komendę kilka razy"
msgid "[-interval <delay>] <count> <command>"
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "[-interval <opóźnienie>] <ilość> <komenda>"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+0100\n"
"PO-Revision-Date: 2019-03-21 23:33+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@ -2584,12 +2584,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "executar um comando várias vezes"
msgid "[-interval <delay>] <count> <command>"
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "[-interval <atraso>] <vezes> <comando>"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -2417,12 +2417,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "executa um comando várias vezes"
msgid "[-interval <delay>] <count> <command>"
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "[-interval <tempo_de_espera>] <contador> <comandos>"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -2051,12 +2051,18 @@ msgstr ""
msgid "execute a command several times"
msgstr "Внутренние команды %s:\n"
msgid "[-interval <delay>] <count> <command>"
msgstr ""
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "Команды Plugin'ов:\n"
#, fuzzy
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -1849,11 +1849,17 @@ msgstr ""
msgid "execute a command several times"
msgstr ""
msgid "[-interval <delay>] <count> <command>"
msgstr ""
#, fuzzy
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr "<eklenti> <komut>"
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2019-03-29 07:53+0100\n"
"POT-Creation-Date: 2019-03-29 20:28+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"
@ -1848,11 +1848,16 @@ msgstr ""
msgid "execute a command several times"
msgstr ""
msgid "[-interval <delay>] <count> <command>"
msgid "[-interval <delay>[<unit>]] <count> <command>"
msgstr ""
msgid ""
" delay: delay between execution of commands (in milliseconds)\n"
" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command does not "
"start with '/')\n"

View File

@ -5250,7 +5250,8 @@ command_repeat_timer_cb (const void *pointer, void *data, int remaining_calls)
COMMAND_CALLBACK(repeat)
{
int arg_count, count, interval, i;
int arg_count, count, i;
long interval;
char *error, **repeat_args;
/* make C compiler happy */
@ -5264,9 +5265,8 @@ COMMAND_CALLBACK(repeat)
if ((argc >= 5) && (string_strcasecmp (argv[1], "-interval") == 0))
{
error = NULL;
interval = (int)strtol (argv[2], &error, 10);
if (!error || error[0] || (interval < 1))
interval = util_parse_delay (argv[2], 1000);
if (interval < 1)
interval = 0;
arg_count = 3;
}
@ -7906,8 +7906,13 @@ command_init ()
hook_command (
NULL, "repeat",
N_("execute a command several times"),
N_("[-interval <delay>] <count> <command>"),
N_(" delay: delay between execution of commands (in milliseconds)\n"
N_("[-interval <delay>[<unit>]] <count> <command>"),
N_(" delay: delay between execution of commands\n"
" unit: optional, values are:\n"
" ms: milliseconds\n"
" s: seconds (default)\n"
" m: minutes\n"
" h: hours\n"
" count: number of times to execute command\n"
"command: command to execute (or text to send to buffer if command "
"does not start with '/')\n"