diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 6f38cc272..afd3307e3 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: + * core: add option "-y" in command /buffer, add support of buffers with free content * core: add option "add" in command /buffer (issue #1113) * core: add option weechat.completion.partial_completion_templates to force partial completion on specific templates * api: add hashtable with variables in plugin structure diff --git a/doc/de/autogen/user/weechat_commands.adoc b/doc/de/autogen/user/weechat_commands.adoc index 4d864ef01..d1b5c2f4b 100644 --- a/doc/de/autogen/user/weechat_commands.adoc +++ b/doc/de/autogen/user/weechat_commands.adoc @@ -640,43 +640,45 @@ Ohne Angabe eines Arguments werden alle installierten Erweiterungen angezeigt. * `+print+`: gibt einen Text in einem Buffer aus ---- -/print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] +/print [-buffer |] [-core|-current] [-y ] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] -beep --buffer: Buffer in welchem der Text ausgegeben werden soll (standardmäßig: aktueller Buffer) - -core: Alternativname für "-buffer core.weechat" --current: Text wird im aktuell genutzten Buffer ausgegeben --escape: Escapesequenzen werden umgewandelt (zum Beispiel \a, \07, \x07) - -date: Datum der Nachricht, mögliche Formatierung: - -n: 'n' vor dem jetzigen Zeipunkt, in Sekunden - +n: 'n' in Zukunft, in Sekunden - n: 'n' Sekunden seit der Epoche (siehe man time) - date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, Beispiel: 2014-01-19T04:32:55 - time: hh:mm:ss (Beispiel: 04:32:55) - -tags: durch Kommata getrennte Liste von Tags (siehe /help filter für eine Liste von Tags die häufig genutzt werden) - text: Text der ausgegeben werden soll (Präfix und Nachricht muss durch \t getrennt werden) --stdout: Text wird an stdout geschickt (Escapesequenzen werden umgewandelt) --stderr: Text wird an stderr geschickt (Escapesequenzen werden umgewandelt) - -beep: Alias für "-stderr \a" + -buffer: display text in this buffer (default: buffer where command is executed) + -core: alias of "-buffer core.weechat" +-current: display text on current buffer + -y: display on a custom line (for buffer with free content only) + line: line number for buffer with free content (first line is 0, a negative number displays after last line: -1 = after last line, -2 = two lines after last line, ...) + -escape: interpret escaped chars (for example \a, \07, \x07) + -date: message date, format can be: + -n: 'n' seconds before now + +n: 'n' seconds in the future + n: 'n' seconds since the Epoch (see man time) + date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, example: 2014-01-19T04:32:55 + time: hh:mm:ss (example: 04:32:55) + -tags: comma-separated list of tags (see /help filter for a list of tags most commonly used) + text: text to display (prefix and message must be separated by "\t", if text starts with "-", then add a "\" before) + -stdout: display text on stdout (escaped chars are interpreted) + -stderr: display text on stderr (escaped chars are interpreted) + -beep: alias of "-stderr \a" -Das Argument -action ... -quit nutzt den Präfix der in der Einstellung "weechat.look.prefix_*" definiert ist. +The options -action ... -quit use the prefix defined in options "weechat.look.prefix_*". -Folgende Escapesequenzen werden unterstützt: +Following escaped chars are supported: \" \\ \a \b \e \f \n \r \t \v \0ooo \xhh \uhhhh \Uhhhhhhhh -Beispiele: - zeigt eine Erinnerung, mit Highlight, im Core-Buffer dar: - /print -core -tags notify_highlight Reminder: Milch kaufen - zeigt eine Fehlernachricht im Core-Buffer an: - /print -core -error irgend ein Fehler - zeigt eine Nachricht im Core-Buffer mit dem Präfix "abc" an: - /print -core abc\tmeine Nachricht - es wird eine Nachricht im Channel #weechat ausgegeben: +Examples: + display a reminder on core buffer with a highlight: + /print -core -tags notify_highlight Reminder: buy milk + display an error on core buffer: + /print -core -error Some error here + display message on core buffer with prefix "abc": + /print -core abc\tThe message + display a message on channel #weechat: /print -buffer irc.freenode.#weechat Message on #weechat - gibt einen Schneemann aus (U+2603): + display a snowman (U+2603): /print -escape \u2603 - verschickt Alarm (BEL): + send alert (BEL): /print -beep ---- diff --git a/doc/en/autogen/user/weechat_commands.adoc b/doc/en/autogen/user/weechat_commands.adoc index 9a1e4c939..5be5de5f7 100644 --- a/doc/en/autogen/user/weechat_commands.adoc +++ b/doc/en/autogen/user/weechat_commands.adoc @@ -640,13 +640,15 @@ Without argument, this command lists loaded plugins. * `+print+`: display text on a buffer ---- -/print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] +/print [-buffer |] [-core|-current] [-y ] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] -beep -buffer: display text in this buffer (default: buffer where command is executed) -core: alias of "-buffer core.weechat" -current: display text on current buffer + -y: display on a custom line (for buffer with free content only) + line: line number for buffer with free content (first line is 0, a negative number displays after last line: -1 = after last line, -2 = two lines after last line, ...) -escape: interpret escaped chars (for example \a, \07, \x07) -date: message date, format can be: -n: 'n' seconds before now diff --git a/doc/fr/autogen/user/weechat_commands.adoc b/doc/fr/autogen/user/weechat_commands.adoc index 52a1d97cd..8358223e1 100644 --- a/doc/fr/autogen/user/weechat_commands.adoc +++ b/doc/fr/autogen/user/weechat_commands.adoc @@ -640,13 +640,15 @@ Sans paramètre, cette commande liste les extensions chargées. * `+print+`: afficher du texte dans un tampon ---- -/print [-buffer |] [-core] [-escape] [-date ] [-tags <étiquettes>] [-action|-error|-join|-network|-quit] [] +/print [-buffer |] [-core|-current] [-y ] [-escape] [-date ] [-tags <étiquettes>] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] -beep -buffer : afficher le texte dans ce tampon (par défaut : tampon où est exécutée la commande) -core : alias de "-buffer core.weechat" -current : afficher le texte dans le tampon courant + -y : afficher sur une ligne personnalisée (pour un tampon avec contenu libre seulement) + ligne : numéro de ligne pour un tampon avec contenu libre (la première ligne est 0, un nombre négatif affiche après la dernière ligne : -1 = après la dernière ligne, -2 = deux lignes après la dernière ligne, etc...) -escape : interpréter les caractères échappés (par exemple \a, \07, \x07) -date : date du message, le format peut être : -n : 'n' secondes avant maintenant diff --git a/doc/it/autogen/user/weechat_commands.adoc b/doc/it/autogen/user/weechat_commands.adoc index f39208bfd..d4e5e9536 100644 --- a/doc/it/autogen/user/weechat_commands.adoc +++ b/doc/it/autogen/user/weechat_commands.adoc @@ -640,13 +640,15 @@ Senza argomento, questo comando elenca i plugin caricati. * `+print+`: display text on a buffer ---- -/print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] +/print [-buffer |] [-core|-current] [-y ] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] -beep -buffer: display text in this buffer (default: buffer where command is executed) -core: alias of "-buffer core.weechat" -current: display text on current buffer + -y: display on a custom line (for buffer with free content only) + line: line number for buffer with free content (first line is 0, a negative number displays after last line: -1 = after last line, -2 = two lines after last line, ...) -escape: interpret escaped chars (for example \a, \07, \x07) -date: message date, format can be: -n: 'n' seconds before now diff --git a/doc/ja/autogen/user/weechat_commands.adoc b/doc/ja/autogen/user/weechat_commands.adoc index a841df508..2aabe5bbc 100644 --- a/doc/ja/autogen/user/weechat_commands.adoc +++ b/doc/ja/autogen/user/weechat_commands.adoc @@ -640,43 +640,45 @@ arguments: ロードするプラグインに与える引数 * `+print+`: バッファ内にテキストを表示 ---- -/print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] +/print [-buffer |] [-core|-current] [-y ] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] -beep - -buffer: 指定したバッファにテキストを表示 (デフォルト: コマンドを実行したバッファ) - -core: "-buffer core.weechat" のエイリアス --current: 現在のバッファにテキストを表示 - -escape: エスケープ文字を解釈 (例えば \a、\07、\x07) - -date: メッセージの日付、書式: - -n: 今から 'n' 秒前 - +n: 今から 'n' 秒後 - n: エポックから 'n' 秒目 (man time を参照) - 日付/時間 (ISO 8601): yyyy-mm-ddThh:mm:ss、例: 2014-01-19T04:32:55 - 時間: hh:mm:ss (example: 04:32:55) - -tags: タグのコンマ区切りリスト (よく使うタグのリストは /help filter を参照) - text: 表示するテキスト (プレフィックスとメッセージは必ず \t で区切ってください、"-" で始まるテキストは "\" を前置してください) - -stdout: 標準出力にテキストを表示 (エスケープ文字を解釈) - -stderr: 標準エラー出力にテキストを表示 (エスケープ文字を解釈) - -beep: "-stderr \a" の別名 + -buffer: display text in this buffer (default: buffer where command is executed) + -core: alias of "-buffer core.weechat" +-current: display text on current buffer + -y: display on a custom line (for buffer with free content only) + line: line number for buffer with free content (first line is 0, a negative number displays after last line: -1 = after last line, -2 = two lines after last line, ...) + -escape: interpret escaped chars (for example \a, \07, \x07) + -date: message date, format can be: + -n: 'n' seconds before now + +n: 'n' seconds in the future + n: 'n' seconds since the Epoch (see man time) + date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, example: 2014-01-19T04:32:55 + time: hh:mm:ss (example: 04:32:55) + -tags: comma-separated list of tags (see /help filter for a list of tags most commonly used) + text: text to display (prefix and message must be separated by "\t", if text starts with "-", then add a "\" before) + -stdout: display text on stdout (escaped chars are interpreted) + -stderr: display text on stderr (escaped chars are interpreted) + -beep: alias of "-stderr \a" -オプション -action ... -quit をつけた場合、プレフィックスは "weechat.look.prefix_*" で定義されているものになります。 +The options -action ... -quit use the prefix defined in options "weechat.look.prefix_*". -以下のエスケープ文字を使うことができます: +Following escaped chars are supported: \" \\ \a \b \e \f \n \r \t \v \0ooo \xhh \uhhhh \Uhhhhhhhh -例: - コアバッファにハイライトを付けてリマインダを表示: +Examples: + display a reminder on core buffer with a highlight: /print -core -tags notify_highlight Reminder: buy milk - コアバッファにエラーを表示: + display an error on core buffer: /print -core -error Some error here - コアバッファにプレフィックス "abc" を付けてメッセージを表示: + display message on core buffer with prefix "abc": /print -core abc\tThe message - チャンネル #weechat にメッセージを表示: + display a message on channel #weechat: /print -buffer irc.freenode.#weechat Message on #weechat - 雪だるまを表示 (U+2603): + display a snowman (U+2603): /print -escape \u2603 - 警告を送信 (BEL): + send alert (BEL): /print -beep ---- diff --git a/doc/pl/autogen/user/weechat_commands.adoc b/doc/pl/autogen/user/weechat_commands.adoc index 0391e14fe..95e31cae2 100644 --- a/doc/pl/autogen/user/weechat_commands.adoc +++ b/doc/pl/autogen/user/weechat_commands.adoc @@ -640,43 +640,45 @@ Bez argumentów ta komenda wyświetli wszystkie załadowane wtyczki. * `+print+`: wyświetl tekst w buforze ---- -/print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] - -stdout|-stderr +/print [-buffer |] [-core|-current] [-y ] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] + -stdout|-stderr [] -beep --buffer: bufor, w którym zostanie wyświetlony tekst (domyślnie: obecny bufor) - -core: alias dla bufora "-buffer core.weechat" --current: wyświetl tekst w obecnym buforze --escape: interpretuj znaki poprzedzone \ (na przykład \a, \07, \x07) - -date: data wiadomości, możliwe formaty: - -n: 'n' sekund wcześniej - +n: 'n' sekund później - n: 'n' sekund od Epoch (zobacz man time) - data/czas (ISO 8601): yyyy-mm-ddThh:mm:ss, przykład: 2014-01-19T04:32:55 - czas: hh:mm:ss (przykład: 04:32:55) - -tags: oddzielona przecinkami lista tagów (zobacz /help filter w celu wyświetlenia listy najczęstszych tagów) - tekst: tekst do wyświetlenia (prefiks i wiadomość muszą być oddzielone za pomocą "\t", jeśli tekst zaczyna się od "-" dodaj "\" przed nim) --stdout: wyświetl tekst na standardowe wyjście (znaki poprzedzone \ są interpretowane) --stderr: wyświetl tekst na standardowe wyjście błędów (znaki poprzedzone \ są interpretowane) - -beep: alias dla "-stderr \a" + -buffer: display text in this buffer (default: buffer where command is executed) + -core: alias of "-buffer core.weechat" +-current: display text on current buffer + -y: display on a custom line (for buffer with free content only) + line: line number for buffer with free content (first line is 0, a negative number displays after last line: -1 = after last line, -2 = two lines after last line, ...) + -escape: interpret escaped chars (for example \a, \07, \x07) + -date: message date, format can be: + -n: 'n' seconds before now + +n: 'n' seconds in the future + n: 'n' seconds since the Epoch (see man time) + date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, example: 2014-01-19T04:32:55 + time: hh:mm:ss (example: 04:32:55) + -tags: comma-separated list of tags (see /help filter for a list of tags most commonly used) + text: text to display (prefix and message must be separated by "\t", if text starts with "-", then add a "\" before) + -stdout: display text on stdout (escaped chars are interpreted) + -stderr: display text on stderr (escaped chars are interpreted) + -beep: alias of "-stderr \a" -Opcje -action ... -quit używają prefiksów zdefiniowanych w opcjach "weechat.look.prefix_*". +The options -action ... -quit use the prefix defined in options "weechat.look.prefix_*". -Wspierane znaczniki specjalne: +Following escaped chars are supported: \" \\ \a \b \e \f \n \r \t \v \0ooo \xhh \uhhhh \Uhhhhhhhh -Przykłady: - wyświetla przypomnienie w buforze głównym z higlightem: - /print -core -tags notify_highlight Reminder: kup mleko - wyświetla błąd w głównym buforze: - /print -core -error Jakiś błąd - wyświetla wiadomość w głównym buforze z prefiksem "abc": - /print -core abc\tWiadomość - wyświetla wiadomość na kanale #weechat: +Examples: + display a reminder on core buffer with a highlight: + /print -core -tags notify_highlight Reminder: buy milk + display an error on core buffer: + /print -core -error Some error here + display message on core buffer with prefix "abc": + /print -core abc\tThe message + display a message on channel #weechat: /print -buffer irc.freenode.#weechat Message on #weechat - wyświetla bałwana (U+2603): + display a snowman (U+2603): /print -escape \u2603 - wysyła alert (BEL): + send alert (BEL): /print -beep ---- diff --git a/po/cs.po b/po/cs.po index 0b2c316d5..29a2acaf2 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -2072,9 +2072,9 @@ msgid "display text on a buffer" msgstr "zobraz text v bufferu" msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" msgid "" @@ -2082,6 +2082,10 @@ msgid "" "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/de.po b/po/de.po index 8ca90ffc0..fdd0087a3 100644 --- a/po/de.po +++ b/po/de.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -2407,20 +2407,26 @@ msgstr "" msgid "display text on a buffer" msgstr "gibt einen Text in einem Buffer aus" +#, fuzzy msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" "action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" "beep" +#, fuzzy msgid "" " -buffer: display text in this buffer (default: buffer where command is " "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/es.po b/po/es.po index 58d45ee4c..c73c87d60 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -2174,9 +2174,9 @@ msgid "display text on a buffer" msgstr "color del texto en el buffer del repetidor" msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" msgid "" @@ -2184,6 +2184,10 @@ msgid "" "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/fr.po b/po/fr.po index 2cd91f10e..96d548938 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: 2018-01-06 14:16+0100\n" -"PO-Revision-Date: 2018-01-06 14:17+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" +"PO-Revision-Date: 2018-01-07 12:00+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -2354,19 +2354,23 @@ msgid "display text on a buffer" msgstr "afficher du texte dans un tampon" msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" -"[-buffer |] [-core] [-escape] [-date ] [-tags " -"<étiquettes>] [-action|-error|-join|-network|-quit] [] || -stdout|-" -"stderr [] || -beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags <étiquettes>] [-action|-error|-join|-network|-quit] [] " +"|| -stdout|-stderr [] || -beep" msgid "" " -buffer: display text in this buffer (default: buffer where command is " "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" @@ -2408,6 +2412,11 @@ msgstr "" "exécutée la commande)\n" " -core : alias de \"-buffer core.weechat\"\n" "-current : afficher le texte dans le tampon courant\n" +" -y : afficher sur une ligne personnalisée (pour un tampon avec contenu " +"libre seulement)\n" +" ligne : numéro de ligne pour un tampon avec contenu libre (la première " +"ligne est 0, un nombre négatif affiche après la dernière ligne : -1 = après " +"la dernière ligne, -2 = deux lignes après la dernière ligne, etc...)\n" " -escape : interpréter les caractères échappés (par exemple \\a, \\07, " "\\x07)\n" " -date : date du message, le format peut être :\n" diff --git a/po/hu.po b/po/hu.po index 8532cb14b..7449e3c04 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1845,9 +1845,9 @@ msgid "display text on a buffer" msgstr "szerver nevének színe" msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" msgid "" @@ -1855,6 +1855,10 @@ msgid "" "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/it.po b/po/it.po index a8aec8929..0a53c537b 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -2217,9 +2217,9 @@ msgid "display text on a buffer" msgstr "colore del testo nei buffer relay" msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" msgid "" @@ -2227,6 +2227,10 @@ msgid "" "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/ja.po b/po/ja.po index 8c9ec5010..e724cb5e9 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" "action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" "beep" +#, fuzzy msgid "" " -buffer: display text in this buffer (default: buffer where command is " "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/pl.po b/po/pl.po index a0b6a4b7b..aee5946bc 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -2330,20 +2330,26 @@ msgstr "" msgid "display text on a buffer" msgstr "wyświetl tekst w buforze" +#, fuzzy msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" "action|-error|-join|-network|-quit] || -stdout|-stderr || -" "beep" +#, fuzzy msgid "" " -buffer: display text in this buffer (default: buffer where command is " "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/pt.po b/po/pt.po index ed3d93b9c..d8881bd13 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -2313,20 +2313,26 @@ msgstr "" msgid "display text on a buffer" msgstr "mostrar texto num buffer" +#, fuzzy msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" "action|-error|-join|-network|-quit] [] || -stdout|-stderr [] " "|| -beep" +#, fuzzy msgid "" " -buffer: display text in this buffer (default: buffer where command is " "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index 6eea225d4..a2db0b184 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -2226,9 +2226,9 @@ msgid "display text on a buffer" msgstr "cor do texto para nomes de buffer" msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" msgid "" @@ -2236,6 +2236,10 @@ msgid "" "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/ru.po b/po/ru.po index eae0002e3..fe6d164e8 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2018-01-06 13:50+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -1868,9 +1868,9 @@ msgid "display text on a buffer" msgstr "цвет названия сервера" msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" msgid "" @@ -1878,6 +1878,10 @@ msgid "" "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/tr.po b/po/tr.po index e18b5fa86..2c07abf1f 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2017-06-26 23:33+0200\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -1670,9 +1670,9 @@ msgid "display text on a buffer" msgstr "" msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" msgid "" @@ -1680,6 +1680,10 @@ msgid "" "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/po/weechat.pot b/po/weechat.pot index 1f5eb76d3..989a3b233 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: 2018-01-06 14:16+0100\n" +"POT-Creation-Date: 2018-01-07 11:55+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -1669,9 +1669,9 @@ msgid "display text on a buffer" msgstr "" msgid "" -"[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" -"beep" +"[-buffer |] [-core|-current] [-y ] [-escape] [-date " +"] [-tags ] [-action|-error|-join|-network|-quit] [] || -" +"stdout|-stderr [] || -beep" msgstr "" msgid "" @@ -1679,6 +1679,10 @@ msgid "" "executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" +" -y: display on a custom line (for buffer with free content only)\n" +" line: line number for buffer with free content (first line is 0, a " +"negative number displays after last line: -1 = after last line, -2 = two " +"lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index d36c4a4bb..9f65b9726 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -4639,7 +4639,7 @@ COMMAND_CALLBACK(plugin) COMMAND_CALLBACK(print) { struct t_gui_buffer *ptr_buffer; - int i, escape, to_stdout, to_stderr; + int i, y, escape, to_stdout, to_stderr, free_content; time_t date, date_now; struct tm tm_date; char *tags, *pos, *text, *text2, *error, empty_string[1] = { '\0' }; @@ -4651,6 +4651,7 @@ COMMAND_CALLBACK(print) (void) data; ptr_buffer = buffer; + y = -1; date = 0; tags = NULL; prefix = NULL; @@ -4682,6 +4683,17 @@ COMMAND_CALLBACK(print) { escape = 1; } + else if (string_strcasecmp (argv[i], "-y") == 0) + { + if (i + 1 >= argc) + COMMAND_ERROR; + i++; + error = NULL; + value = strtol (argv[i], &error, 10); + if (!error || error[0]) + COMMAND_ERROR; + y = (int)value; + } else if (string_strcasecmp (argv[i], "-date") == 0) { if (i + 1 >= argc) @@ -4783,7 +4795,9 @@ COMMAND_CALLBACK(print) argv_eol[i] + 1 : argv_eol[i]; } else + { ptr_text = empty_string; + } if (to_stdout || to_stderr) { @@ -4797,6 +4811,9 @@ COMMAND_CALLBACK(print) } else { + if (!ptr_buffer) + ptr_buffer = gui_buffer_search_main (); + free_content = (ptr_buffer && (ptr_buffer->type == GUI_BUFFER_TYPE_FREE)); text = strdup (ptr_text); if (text) { @@ -4806,7 +4823,7 @@ COMMAND_CALLBACK(print) pos = strstr (text, "\\t"); if (pos) { - pos[0] = '\t'; + pos[0] = (free_content) ? ' ' : '\t'; memmove (pos + 1, pos + 2, strlen (pos + 2) + 1); } } @@ -4814,11 +4831,21 @@ COMMAND_CALLBACK(print) string_convert_escaped_chars (text) : strdup (text); if (text2) { - gui_chat_printf_date_tags ( - ptr_buffer, date, tags, - "%s%s", - (prefix) ? prefix : ((!prefix && !pos) ? "\t" : ""), - text2); + if (free_content) + { + gui_chat_printf_y (ptr_buffer, y, + "%s%s", + (prefix) ? prefix : "", + text2); + } + else + { + gui_chat_printf_date_tags ( + ptr_buffer, date, tags, + "%s%s", + (prefix) ? prefix : ((!prefix && !pos) ? "\t" : ""), + text2); + } free (text2); } free (text); @@ -7784,14 +7811,20 @@ command_init () hook_command ( NULL, "print", N_("display text on a buffer"), - N_("[-buffer |] [-core] [-escape] [-date ] " - "[-tags ] [-action|-error|-join|-network|-quit] []" + N_("[-buffer |] [-core|-current] [-y ] [-escape] " + "[-date ] [-tags ] " + "[-action|-error|-join|-network|-quit] []" " || -stdout|-stderr []" " || -beep"), N_(" -buffer: display text in this buffer (default: buffer where " "command is executed)\n" " -core: alias of \"-buffer core.weechat\"\n" "-current: display text on current buffer\n" + " -y: display on a custom line (for buffer with free content " + "only)\n" + " line: line number for buffer with free content (first line " + "is 0, a negative number displays after last line: -1 = after last " + "line, -2 = two lines after last line, ...)\n" " -escape: interpret escaped chars (for example \\a, \\07, \\x07)\n" " -date: message date, format can be:\n" " -n: 'n' seconds before now\n" @@ -7829,7 +7862,9 @@ command_init () " send alert (BEL):\n" " /print -beep"), "-buffer %(buffers_numbers)|%(buffers_plugins_names)" - " || -core|-escape|-date|-tags|-action|-error|-join|-network|-quit" + " || -y -1|0|1|2|3" + " || -core|-current|-escape|-date|-tags|-action|-error|-join|" + "-network|-quit" " || -stdout" " || -stderr" " || -beep",