diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-10-11 16:33:50 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-10-11 16:33:50 +0200 |
commit | fa46a2fe2d1d785c76f1584ac838bf767bf0e56c (patch) | |
tree | 0f3f076b994e2a31b1f53ad72b9c7331ed94110f /doc | |
parent | 4d696d7cc86d04277fba288228dd376c542c5e18 (diff) | |
download | weechat-fa46a2fe2d1d785c76f1584ac838bf767bf0e56c.zip |
exec: add option "-oerr" to send stderr to buffer (now disabled by default) (closes #1566)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/de/includes/autogen_user_commands.de.adoc | 101 | ||||
-rw-r--r-- | doc/en/includes/autogen_user_commands.en.adoc | 3 | ||||
-rw-r--r-- | doc/fr/includes/autogen_user_commands.fr.adoc | 3 | ||||
-rw-r--r-- | doc/it/includes/autogen_user_commands.it.adoc | 3 | ||||
-rw-r--r-- | doc/ja/includes/autogen_user_commands.ja.adoc | 99 | ||||
-rw-r--r-- | doc/pl/includes/autogen_user_commands.pl.adoc | 109 |
6 files changed, 162 insertions, 156 deletions
diff --git a/doc/de/includes/autogen_user_commands.de.adoc b/doc/de/includes/autogen_user_commands.de.adoc index b2fe7ecd8..46aab098b 100644 --- a/doc/de/includes/autogen_user_commands.de.adoc +++ b/doc/de/includes/autogen_user_commands.de.adoc @@ -2175,7 +2175,7 @@ charset: wähle neuen Zeichensatz für aktuellen Buffer ---- /exec -list - [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-n|-nf] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] [-pipe <command>] [-hsignal <name>] <command> + [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-oc|-n|-nf] [-oerr] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] [-pipe <command>] [-hsignal <name>] <command> -in <id> <text> -inclose <id> [<text>] -signal <id> <signal> @@ -2184,55 +2184,56 @@ charset: wähle neuen Zeichensatz für aktuellen Buffer -set <id> <property> <value> -del <id>|-all [<id>...] - -list: zeigt laufende Befehle an - -sh: es wird die shell verwendet um Befehle auszuführen, mehrere Befehle können dabei gepiped werden (WARNUNG: Dieses Argument sollte nur verwendet werden, falls alle Argumente unbedenklich sind, siehe Argument -nosh) - -nosh: die shell wird nicht verwendet um Befehle auszuführen (wird benötigt, falls der Befehl mit sensiblen Daten hantiert. Zum Beispiel der Inhalt einer Nachricht eines anderen Users)(Standardverhalten) - -bg: führt Prozess im Hintergrund aus: es wird weder eine Prozessausgabe noch ein Rückgabewert ausgegeben (nicht kompatibel mit Argumenten -o/-oc/-n/-nf/-pipe/-hsignal) - -nobg: gibt Prozessausgabe und Rückgabewert aus (Standardverhalten) - -stdin: erstellt eine PIPE um Daten zu dem Prozess zu senden (mittels /exec -in/-inclose) --nostdin: es wird keine PIPE für stdin erstellt (Standardverhalten) - -buffer: zeigt/sendet Ausgabe des Befehls an diesen Buffer (wird der angegebene Buffer nicht gefunden wird ein neuer Buffer mit dem Namen "exec.exec.xxx" erstellt) - -l: gibt die Ausgabe des Befehls lokal im Buffer aus (Standardverhalten) - -o: gibt die Ausgabe des Befehls im Buffer aus (nicht kompatibel mit Argumenten -bg/-pipe/-hsignal) - -oc: gibt die Ausgabe des Befehls im Buffer aus und führt diesen dann aus (betrifft Zeilen die mit "/" beginnen bzw. das benutzerdefinierte Befehlszeichen verwenden) (nicht kompatibel mit Argumenten -bg/-pipe/-hsignal) - -n: gibt die Ausgabe des Befehls in einem neuen Buffer aus (nicht kompatibel mit Argumenten -bg/-pipe/-hsignal) - -nf: gibt die Ausgabe des Befehls in einem neuen Buffer, mit einem freien Inhalt, aus (kein Zeilenumbruch, keine Limitierung in der Anzahl der Zeilen), aus (nicht kompatibel mit Argument -bg/-pipe/-hsignal) - -cl: der neue Buffer wird vor einer Ausgabe gelöscht - -nocl: Ausgabe wird an neuen Buffer angehangen, ohne diesen vorher zu löschen (Standardverhalten) - -sw: es wird zum Ausgabebuffer gewechselt (Standardverhalten) - -nosw: es wird nicht zum Ausgabebuffer gewechselt - -ln: legt eine Zeilennummerierung an (Standardverhalten, nur für neue Buffer) - -noln: es wird keine Zeilennummerierung angezeigt - -flush: die Ausgabe des Befehls findet in Echtzeit statt (Standardwert) --noflush: die Ausgabe des Befehls wird am Ende der Ausführung ausgegeben - -color: es wird eine der folgenden Aktionen bei ANSI Zeichenkodierungen in der Ausgabe durchgeführt: - ansi: ANSI-Kodierung wird beibehalten - auto: konvertiert ANSI-Farben nach WeeChat/IRC (Standardverhalten) - irc: konvertiert ANSI-Farben nach IRC Farben - weechat: konvertiert ANSI-Farben nach WeeChat-Farben - strip: ANSI-Farben werden entfernt - -rc: der Rückgabewert wird ausgegeben (Standardverhalten) - -norc: der Rückgabewert wird unterdrückt --timeout: gibt eine Zeitbeschränkung für den auszuführenden Befehl an (in Sekunden) - -name: dem Befehl wird ein Name zugewiesen (um den Befehl später mittels /exec zu nutzen) - -pipe: sendet die Ausgabe an einen Befehl von WeeChat/Erweiterung (Zeile für Zeile); sollen Leerzeichen im Befehl/Argument verwendet werden, müssen diese mit Anführungszeichen eingeschlossen werden; Variable $line wird durch die entsprechende Zeile ersetzt (standardmäßig wird die Zeile, getrennt durch ein Leerzeichen, dem Befehl nachgestellt (nicht kompatibel mit den Argumenten -bg/-o/-oc/-n/-nf) - -hsignal: sendet die Ausgabe als hsignal (um es z.B. mittels /trigger zu verwenden) (nicht kompatibel mit den Argumenten -bg/-o/-oc/-n/-nf) - command: Befehl der ausgeführt werden soll; beginnt der Befehl mit "url:", wird die shell deaktiviert und der Inhalt der URL wird heruntergeladen und im Buffer ausgegeben - id: identifiziert eindeutig einen Befehl: entweder durch eine Nummer oder einen Namen (sofern ein Name mittels "-name xxx" zugewiesen wurde) - -in: sendet Text an die Standardeingabe des Prozesses --inclose: wie -in aber stdin wird danach geschlossen (und der Text ist optional: ohne Text wird stdin umgehend geschlossen - -signal: schickt ein Signal an den Prozess; das Signal kann entweder ein Integerwert oder eines der folgenden Schlüsselworte sein: hup, int, quit, kill, term, usr1, usr2 - -kill: Alias für "-signal <id> kill" --killall: beendet alle laufenden Prozesse - -set: nutzt eine Hook-Fähigkeit (siehe Funktion hook_set in Anleitung für API Erweiterung) -property: Hook-Fähigkeit - value: neuer Wert für Hook-Fähigkeit - -del: entfernt einen beendeten Befehl - -all: entfernt alle beendeten Befehle - -Standardoptionen können in der Einstellung exec.command.default_options bestimmt werden. - -Beispiele: + -list: list commands + -sh: use the shell to execute the command, many commands can be piped (WARNING: use this option ONLY if all arguments are safe, see option -nosh) + -nosh: do not use the shell to execute the command (required if the command has some unsafe data, for example the content of a message from another user) (default) + -bg: run process in background: do not display process output neither return code (not compatible with options -o/-oc/-n/-nf/-pipe/-hsignal) + -nobg: catch process output and display return code (default) + -stdin: create a pipe for sending data to the process (with /exec -in/-inclose) +-nostdin: do not create a pipe for stdin (default) + -buffer: display/send output of command on this buffer (if the buffer is not found, a new buffer with name "exec.exec.xxx" is created) + -l: display locally output of command on buffer (default) + -o: send output of command to the buffer without executing commands (not compatible with options -bg/-pipe/-hsignal) + -oc: send output of command to the buffer and execute commands (lines starting with "/" or another custom command char) (not compatible with options -bg/-pipe/-hsignal) + -n: display output of command in a new buffer (not compatible with options -bg/-pipe/-hsignal) + -nf: display output of command in a new buffer with free content (no word-wrap, no limit on number of lines) (not compatible with options -bg/-pipe/-hsignal) + -oerr: also send stderr (error output) to the buffer (can be used only with options -o and -oc) + -cl: clear the new buffer before displaying output + -nocl: append to the new buffer without clear (default) + -sw: switch to the output buffer (default) + -nosw: don't switch to the output buffer + -ln: display line numbers (default in new buffer only) + -noln: don't display line numbers + -flush: display output of command in real time (default) +-noflush: display output of command after its end + -color: action on ANSI colors in output: + ansi: keep ANSI codes as-is + auto: convert ANSI colors to WeeChat/IRC (default) + irc: convert ANSI colors to IRC colors + weechat: convert ANSI colors to WeeChat colors + strip: remove ANSI colors + -rc: display return code (default) + -norc: don't display return code +-timeout: set a timeout for the command (in seconds) + -name: set a name for the command (to name it later with /exec) + -pipe: send the output to a WeeChat/plugin command (line by line); if there are spaces in command/arguments, enclose them with double quotes; variable $line is replaced by the line (by default the line is added after the command, separated by a space) (not compatible with options -bg/-o/-oc/-n/-nf) +-hsignal: send the output as a hsignal (to be used for example in a trigger) (not compatible with options -bg/-o/-oc/-n/-nf) + command: the command to execute; if beginning with "url:", the shell is disabled and the content of URL is downloaded and sent as output + id: command identifier: either its number or name (if set with "-name xxx") + -in: send text on standard input of process +-inclose: same as -in, but stdin is closed after (and text is optional: without text, the stdin is just closed) + -signal: send a signal to the process; the signal can be an integer or one of these names: hup, int, quit, kill, term, usr1, usr2 + -kill: alias of "-signal <id> kill" +-killall: kill all running processes + -set: set a hook property (see function hook_set in plugin API reference) +property: hook property + value: new value for hook property + -del: delete a terminated command + -all: delete all terminated commands + +Default options can be set in the option exec.command.default_options. + +Examples: /exec -n ls -l /tmp /exec -sh -n ps xu | grep weechat /exec -n -norc url:https://pastebin.com/raw.php?i=xxxxxxxx diff --git a/doc/en/includes/autogen_user_commands.en.adoc b/doc/en/includes/autogen_user_commands.en.adoc index b22beceef..602e8bfe4 100644 --- a/doc/en/includes/autogen_user_commands.en.adoc +++ b/doc/en/includes/autogen_user_commands.en.adoc @@ -2175,7 +2175,7 @@ charset: new charset for current buffer ---- /exec -list - [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-n|-nf] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] [-pipe <command>] [-hsignal <name>] <command> + [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-oc|-n|-nf] [-oerr] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] [-pipe <command>] [-hsignal <name>] <command> -in <id> <text> -inclose <id> [<text>] -signal <id> <signal> @@ -2197,6 +2197,7 @@ charset: new charset for current buffer -oc: send output of command to the buffer and execute commands (lines starting with "/" or another custom command char) (not compatible with options -bg/-pipe/-hsignal) -n: display output of command in a new buffer (not compatible with options -bg/-pipe/-hsignal) -nf: display output of command in a new buffer with free content (no word-wrap, no limit on number of lines) (not compatible with options -bg/-pipe/-hsignal) + -oerr: also send stderr (error output) to the buffer (can be used only with options -o and -oc) -cl: clear the new buffer before displaying output -nocl: append to the new buffer without clear (default) -sw: switch to the output buffer (default) diff --git a/doc/fr/includes/autogen_user_commands.fr.adoc b/doc/fr/includes/autogen_user_commands.fr.adoc index 079acd1c3..18afdea01 100644 --- a/doc/fr/includes/autogen_user_commands.fr.adoc +++ b/doc/fr/includes/autogen_user_commands.fr.adoc @@ -2175,7 +2175,7 @@ charset : nouveau charset pour le tampon courant ---- /exec -list - [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <nom>] [-l|-o|-n|-nf] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] |-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <délai>] [-name <nom>] [-pipe <commande>] [-hsignal <nom>] <commande> + [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <nom>] [-l|-o|-oc|-n|-nf] [-oerr] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] |-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <délai>] [-name <nom>] [-pipe <commande>] [-hsignal <nom>] <commande> -in <id> <texte> -inclose <id> [<texte>] -signal <id> <signal> @@ -2197,6 +2197,7 @@ charset : nouveau charset pour le tampon courant -oc : envoyer la sortie de la commande au tampon et exécuter les commandes (lignes commençant par "/" ou un caractère personnalisé de commande) (non compatible avec les options -bg/-pipe/-hsignal) -n : afficher la sortie de la commande dans un nouveau tampon (non compatible avec les options -bg/-pipe/-hsignal) -nf : afficher la sortie de la commande dans un nouveau tampon avec contenu libre (pas de coupure des mots, pas de limite sur le nombre de lignes) (non compatible avec les options -bg/-pipe/-hsignal) + -oerr : envoyer aussi stderr (sortie d'erreur) au tampon (peut être utilisé seulement avec les options -o et -oc) -cl : effacer le nouveau tampon avant d'afficher la sortie -nocl : ajouter au nouveau tampon sans effacer (par défaut) -sw : basculer vers le tampon de sortie (par défaut) diff --git a/doc/it/includes/autogen_user_commands.it.adoc b/doc/it/includes/autogen_user_commands.it.adoc index aef566d8a..097a190f2 100644 --- a/doc/it/includes/autogen_user_commands.it.adoc +++ b/doc/it/includes/autogen_user_commands.it.adoc @@ -2175,7 +2175,7 @@ set_caratteri: nuovo set di caratteri per il buffer corrente ---- /exec -list - [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-n|-nf] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] [-pipe <command>] [-hsignal <name>] <command> + [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-oc|-n|-nf] [-oerr] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] [-pipe <command>] [-hsignal <name>] <command> -in <id> <text> -inclose <id> [<text>] -signal <id> <signal> @@ -2197,6 +2197,7 @@ set_caratteri: nuovo set di caratteri per il buffer corrente -oc: send output of command to the buffer and execute commands (lines starting with "/" or another custom command char) (not compatible with options -bg/-pipe/-hsignal) -n: display output of command in a new buffer (not compatible with options -bg/-pipe/-hsignal) -nf: display output of command in a new buffer with free content (no word-wrap, no limit on number of lines) (not compatible with options -bg/-pipe/-hsignal) + -oerr: also send stderr (error output) to the buffer (can be used only with options -o and -oc) -cl: clear the new buffer before displaying output -nocl: append to the new buffer without clear (default) -sw: switch to the output buffer (default) diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc index 5aeb2fd2e..1a41fe941 100644 --- a/doc/ja/includes/autogen_user_commands.ja.adoc +++ b/doc/ja/includes/autogen_user_commands.ja.adoc @@ -2175,7 +2175,7 @@ charset: 現在のバッファの新しい文字セット ---- /exec -list - [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-n|-nf] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] [-pipe <command>] [-hsignal <name>] <command> + [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-oc|-n|-nf] [-oerr] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] [-pipe <command>] [-hsignal <name>] <command> -in <id> <text> -inclose <id> [<text>] -signal <id> <signal> @@ -2184,55 +2184,56 @@ charset: 現在のバッファの新しい文字セット -set <id> <property> <value> -del <id>|-all [<id>...] - -list: コマンドをリストアップ - -sh: コマンドを実行する際にシェルを使う、複数のコマンドをパイプすることも可能 (警告: このオプションを使えるのは、全ての引数が安全な場合だけです、オプション -nosh を参照してください) - -nosh: コマンドを実行する際にシェルを使わない (コマンドに安全でないデータが含まれる場合に必要、例えば他のユーザからのメッセージの内容) (デフォルト) - -bg: プロセスをバックグラウンド実行: プロセスの出力およびリターンコードを表示しない (オプション -o/-oc/-n/-nf/-pipe/-hsignal と同時に利用できません) - -nobg: プロセスの出力を受け取り、リターンコードを表示する (デフォルト) - -stdin: プロセスにデータを送信するパイプを作成する (/exec -in/-inclose を使う) --nostdin: 標準入力用にパイプを作成しない (デフォルト) - -buffer: コマンドの出力をこのバッファに表示 / 送信する (バッファが見つからない場合、新しいバッファ "exec.exec.xxx" が作られます) - -l: コマンドの出力をカレントバッファに表示 (デフォルト) - -o: コマンドの出力をカレントバッファに送信、カレントバッファは受信した内容をコマンドとして実行しません (オプション -bg/-pipe/-hsignal と同時に利用できません) - -oc: コマンドの出力をカレントバッファに送信、カレントバッファは受信した内容 (先頭に "/" もしくはそれ以外のコマンド開始文字を含む行) をコマンドとして実行します (オプション -bg/-pipe/-hsignal と同時に利用できません) - -n: コマンドの出力を新しいバッファに表示 (オプション -bg/-pipe/-hsignal と同時に利用できません) - -nf: コマンドの出力を自由内容 (禁則処理なし、行数制限なし) の新しいバッファに表示 (オプション -bg/-pipe/-hsignal と同時に利用できません) - -cl: 出力を表示する前に新しいバッファをクリア - -nocl: 新しいバッファをクリアせずに追加 (デフォルト) - -sw: 出力バッファに移動 (デフォルト) - -nosw: 出力バッファに移動しない - -ln: 行数を表示 (新しいバッファに表示する場合はデフォルト) - -noln: 行数を表示しない - -flush: コマンドの出力をすぐに表示 (デフォルト) --noflush: コマンドの出力をコマンドの終了後に表示 - -color: 出力に含まれる ANSI 色に対する挙動: - ansi: ANSI 色をそのままにする - auto: ANSI 色を WeeChat/IRC 色に変換 (デフォルト) - irc: ANSI 色を IRC 色に変換 - weechat: ANSI 色を WeeChat 色に変換 - strip: ANSI 色を削除 - -rc: リターンコードを表示 (デフォルト) - -norc: リターンコードを表示しない --timeout: コマンドのタイムアウトを設定 (秒単位) - -name: コマンドの名前を設定 (後から名前を付けるには /exec を使う) - -pipe: WeeChat およびプラグインコマンドに出力を送信 (1 行ごと); コマンドおよび引数に空白が含まれる場合、2 重引用符で囲ってください; 引数 $line はその行で置換されます (デフォルトではコマンドの後ろに空白を付けてから行を追加します) (オプション -bg/-o/-oc/-n/-nf と同時に利用できません) --hsignal: hsignal として出力を送信 (例えばトリガで使われます) (オプション -bg/-o/-oc/-n/-nf と同時に利用できません) - command: 実行するコマンド; "url:" で始まる場合、シェルは無効化され、URL の内容がダウンロードされ、出力として送信されます - id: コマンド識別子: 番号か名前 ("-name xxx" で設定した場合) のどちらか一方 - -in: プロセスの標準入力にテキストを送信 --inclose: -in と同じ、ただし使用後に標準入力を閉じる (テキストは任意: テキストが無い場合、標準入力をすぐに閉じる) - -signal: プロセスにシグナルを送信; シグナルは整数値または次の名前の 1 つ: hup、int、quit、kill、term、usr1、usr2 - -kill: "-signal <id> kill" のエイリアス --killall: 全ての実行中プロセスを kill する - -set: フックプロパティを設定 (プラグイン API リファレンスの hook_set 関数を参照してください) -property: フックプロパティ - value: フックプロパティの新しい値 - -del: 中断されたコマンドを削除 - -all: 全ての中断されたコマンドを削除 - -オプション exec.command.default_options でデフォルトオプションの設定が可能です。 + -list: list commands + -sh: use the shell to execute the command, many commands can be piped (WARNING: use this option ONLY if all arguments are safe, see option -nosh) + -nosh: do not use the shell to execute the command (required if the command has some unsafe data, for example the content of a message from another user) (default) + -bg: run process in background: do not display process output neither return code (not compatible with options -o/-oc/-n/-nf/-pipe/-hsignal) + -nobg: catch process output and display return code (default) + -stdin: create a pipe for sending data to the process (with /exec -in/-inclose) +-nostdin: do not create a pipe for stdin (default) + -buffer: display/send output of command on this buffer (if the buffer is not found, a new buffer with name "exec.exec.xxx" is created) + -l: display locally output of command on buffer (default) + -o: send output of command to the buffer without executing commands (not compatible with options -bg/-pipe/-hsignal) + -oc: send output of command to the buffer and execute commands (lines starting with "/" or another custom command char) (not compatible with options -bg/-pipe/-hsignal) + -n: display output of command in a new buffer (not compatible with options -bg/-pipe/-hsignal) + -nf: display output of command in a new buffer with free content (no word-wrap, no limit on number of lines) (not compatible with options -bg/-pipe/-hsignal) + -oerr: also send stderr (error output) to the buffer (can be used only with options -o and -oc) + -cl: clear the new buffer before displaying output + -nocl: append to the new buffer without clear (default) + -sw: switch to the output buffer (default) + -nosw: don't switch to the output buffer + -ln: display line numbers (default in new buffer only) + -noln: don't display line numbers + -flush: display output of command in real time (default) +-noflush: display output of command after its end + -color: action on ANSI colors in output: + ansi: keep ANSI codes as-is + auto: convert ANSI colors to WeeChat/IRC (default) + irc: convert ANSI colors to IRC colors + weechat: convert ANSI colors to WeeChat colors + strip: remove ANSI colors + -rc: display return code (default) + -norc: don't display return code +-timeout: set a timeout for the command (in seconds) + -name: set a name for the command (to name it later with /exec) + -pipe: send the output to a WeeChat/plugin command (line by line); if there are spaces in command/arguments, enclose them with double quotes; variable $line is replaced by the line (by default the line is added after the command, separated by a space) (not compatible with options -bg/-o/-oc/-n/-nf) +-hsignal: send the output as a hsignal (to be used for example in a trigger) (not compatible with options -bg/-o/-oc/-n/-nf) + command: the command to execute; if beginning with "url:", the shell is disabled and the content of URL is downloaded and sent as output + id: command identifier: either its number or name (if set with "-name xxx") + -in: send text on standard input of process +-inclose: same as -in, but stdin is closed after (and text is optional: without text, the stdin is just closed) + -signal: send a signal to the process; the signal can be an integer or one of these names: hup, int, quit, kill, term, usr1, usr2 + -kill: alias of "-signal <id> kill" +-killall: kill all running processes + -set: set a hook property (see function hook_set in plugin API reference) +property: hook property + value: new value for hook property + -del: delete a terminated command + -all: delete all terminated commands + +Default options can be set in the option exec.command.default_options. -例: +Examples: /exec -n ls -l /tmp /exec -sh -n ps xu | grep weechat /exec -n -norc url:https://pastebin.com/raw.php?i=xxxxxxxx diff --git a/doc/pl/includes/autogen_user_commands.pl.adoc b/doc/pl/includes/autogen_user_commands.pl.adoc index 5a4d7112a..7cae1a8a3 100644 --- a/doc/pl/includes/autogen_user_commands.pl.adoc +++ b/doc/pl/includes/autogen_user_commands.pl.adoc @@ -2174,67 +2174,68 @@ kodowanie: nowe kodowanie dla obecnego bufora ---- /exec -list - [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <nazwa>] [-l|-o|-n|-nf] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <czas>] [-name <nazwa>] [-pipe <komenda>] [-hsignal <nazwa>] <komenda> - -in <id> <tekst> - -inclose <id> [<tekst>] - -signal <id> <sygnał> + [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-oc|-n|-nf] [-oerr] [-cl|-nocl] [-sw|-nosw] [-ln|-noln] [-flush|-noflush] [-color ansi|auto|irc|weechat|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] [-pipe <command>] [-hsignal <name>] <command> + -in <id> <text> + -inclose <id> [<text>] + -signal <id> <signal> -kill <id> -killall - -set <id> <właściwość> <wartość> + -set <id> <property> <value> -del <id>|-all [<id>...] - -list: wyświetla komendy - -sh: użyj powłoki do wykonania komendy (UWAGA: użyj tej opcji TYLKO jeśli wszystkie argumenty są bezpieczne, zobacz opcję -nosh) - -nosh: nie używaj powłoki do wykonania komendy (wymagane jeśli komenda posiada niebezpieczne dane, na przykład zawartość wiadomości od innego użytkownika) (domyślne) - -bg: uruchom proces w tle: nie wyświetlaj wyjścia z procesu ani zwracanego kodu (nie kompatybilne z opcjami -o/-n) - -nobg: przechwyć całość wyjścia z procesu i wyświetl kod wyjścia (domyślne) - -stdin: tworzy strumień do wysyłania danych do procesu (za pomocą /exec -in/-inclose) --nostdin: nie twórz strumienia dla stdin (domyślne) - -buffer: wyświetl/wyślij wyjście komendy do tego bufora (jeśli bufor nie zostanie znaleziony zostanie utworzony nowy bufor o nazwie "exec.exec.xxx") - -l: wyświetl lokalnie wyście z komendy w buforze (domyślne) - -o: wyślij wyjście z komendy do bufora (nie kompatybilne z opcjami -bg/-pipe/-hsignal) - -oc: wysyła wyjście komendy do bufora i wykonuje komendy (linie zaczynające się od "/" lub własnego znaku komendy) (nie kompatybilne z opcjami -bg/-pipe/-hsignal) - -n: wyświetl wyjście komendy w nowym buforze (nie kompatybilne z opcjami -bg/-pipe/-hsignal) - -nf: wyświetl wyjście komendy w nowym buforze z wolna zawartością (brak zawijania słów, bez limitu ilości linii) (nie kompatybilne z opcjami -bg/-pipe/-hsignal) - -cl: wyczyść nowy bufor przed wyświetleniem wyjścia - -nocl: dodaj do nowego bufora bez czyszczenia zawartości (domyślne) - -sw: przełącz na bufor wyjściowy (domyślne) - -nosw: nie przełączaj na bufor wyjściowy - -ln: wyświetl numery linii (domyślne tylko w nowym buforze) - -noln: nie wyświetlaj numerów linii - -flush: wyświetl wyjście z komendy w czasie rzeczywistym (domyślne) --noflush: wyświetl wyjście z komendy po jej zakończeniu - -color: akcja na kolorach ANSI w wyjściu: - ansi: zachowaj kody ANSI - auto: konwertuj kolory ANSI na WeeChat/IRC (domyślne) - irc: konwertuj kolory ANSI na kolory IRC - weechat: konwertuj kolory ANSI na kolory WeeChat - strip: usuń kolory ANSI - -rc: wyświetl kod wyjścia (domyślne) - -norc: nie wyświetlaj kodu wyjścia --timeout: ustaw timeout dla komendy (w sekundach) - -name: ustaw nazwę dla komendy (do wywołania później za pomocą /exec) - -pipe: wyślij wyjście do WeeChat/wtyczki (linia po linii); jeśli występują spacje w komendzie/argumentach, otocz je cudzysłowem; zmienna $line jest zastępowana przez linie (domyślnie linia jest dodawana za komendą, oddzielona spacją) (nie kompatybilne z opcjami -bg/-o/-oc/-n/-nf) --hsignal: wyślij wyjście jako hsignal (w celu użycia na przykład w triggerze) (nie kompatybilne z opcjami -bg/-o/-oc/-n/-nf) - komenda: komenda do wykonania; jeśli zaczyna się od "url:", powłoka jest wyłączana i zawartość URLa jest pobierana i wysyłana jako wyjście - id: identyfikator komendy: numer lub nazwa (jeśli ustawiona przez "-name xxx") - -in: wyślij tekst na standardowe wejście procesu --inclose: to samo co -in, ale stdin jest zamykane (tekst jest opcjonalny: bez niego stdin jest po prostu zamykane) - -signal: wysyła sygnał do procesu; sygnał może być liczbą całkowitą lub jedna z nazw: hup, int, quit, kill, term, usr1, usr2 - -kill: alias dla "-signal <id> kill" --killall: zabija wszystkie działające procesy - -set: ustawia przypisaną właściwość (zobacz funkcję hook_set w opisie API wtyczek) -właściwość: przypisana właściwość - wartość: nowa wartość - -del: usuń zakończoną komendę - -all: usuń wszystkie zakończone komendy - -Domyślne opcje mogą być ustawione za pomocą opcji exec.command.default_options. + -list: list commands + -sh: use the shell to execute the command, many commands can be piped (WARNING: use this option ONLY if all arguments are safe, see option -nosh) + -nosh: do not use the shell to execute the command (required if the command has some unsafe data, for example the content of a message from another user) (default) + -bg: run process in background: do not display process output neither return code (not compatible with options -o/-oc/-n/-nf/-pipe/-hsignal) + -nobg: catch process output and display return code (default) + -stdin: create a pipe for sending data to the process (with /exec -in/-inclose) +-nostdin: do not create a pipe for stdin (default) + -buffer: display/send output of command on this buffer (if the buffer is not found, a new buffer with name "exec.exec.xxx" is created) + -l: display locally output of command on buffer (default) + -o: send output of command to the buffer without executing commands (not compatible with options -bg/-pipe/-hsignal) + -oc: send output of command to the buffer and execute commands (lines starting with "/" or another custom command char) (not compatible with options -bg/-pipe/-hsignal) + -n: display output of command in a new buffer (not compatible with options -bg/-pipe/-hsignal) + -nf: display output of command in a new buffer with free content (no word-wrap, no limit on number of lines) (not compatible with options -bg/-pipe/-hsignal) + -oerr: also send stderr (error output) to the buffer (can be used only with options -o and -oc) + -cl: clear the new buffer before displaying output + -nocl: append to the new buffer without clear (default) + -sw: switch to the output buffer (default) + -nosw: don't switch to the output buffer + -ln: display line numbers (default in new buffer only) + -noln: don't display line numbers + -flush: display output of command in real time (default) +-noflush: display output of command after its end + -color: action on ANSI colors in output: + ansi: keep ANSI codes as-is + auto: convert ANSI colors to WeeChat/IRC (default) + irc: convert ANSI colors to IRC colors + weechat: convert ANSI colors to WeeChat colors + strip: remove ANSI colors + -rc: display return code (default) + -norc: don't display return code +-timeout: set a timeout for the command (in seconds) + -name: set a name for the command (to name it later with /exec) + -pipe: send the output to a WeeChat/plugin command (line by line); if there are spaces in command/arguments, enclose them with double quotes; variable $line is replaced by the line (by default the line is added after the command, separated by a space) (not compatible with options -bg/-o/-oc/-n/-nf) +-hsignal: send the output as a hsignal (to be used for example in a trigger) (not compatible with options -bg/-o/-oc/-n/-nf) + command: the command to execute; if beginning with "url:", the shell is disabled and the content of URL is downloaded and sent as output + id: command identifier: either its number or name (if set with "-name xxx") + -in: send text on standard input of process +-inclose: same as -in, but stdin is closed after (and text is optional: without text, the stdin is just closed) + -signal: send a signal to the process; the signal can be an integer or one of these names: hup, int, quit, kill, term, usr1, usr2 + -kill: alias of "-signal <id> kill" +-killall: kill all running processes + -set: set a hook property (see function hook_set in plugin API reference) +property: hook property + value: new value for hook property + -del: delete a terminated command + -all: delete all terminated commands + +Default options can be set in the option exec.command.default_options. -Przykłady: +Examples: /exec -n ls -l /tmp /exec -sh -n ps xu | grep weechat - /exec -n -norc url:http://pastebin.com/raw.php?i=xxxxxxxx + /exec -n -norc url:https://pastebin.com/raw.php?i=xxxxxxxx /exec -nf -noln links -dump https://weechat.org/files/doc/devel/weechat_user.en.html /exec -o uptime /exec -pipe "/print Machine uptime:" uptime |