summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/autogen/plugin_api/completions.txt2
-rw-r--r--doc/en/autogen/plugin_api/infos.txt6
-rw-r--r--doc/en/autogen/user/exec_commands.txt53
-rw-r--r--doc/en/autogen/user/exec_options.txt20
-rw-r--r--doc/en/autogen/user/weechat_commands.txt17
-rw-r--r--doc/en/weechat_user.en.txt27
6 files changed, 119 insertions, 6 deletions
diff --git a/doc/en/autogen/plugin_api/completions.txt b/doc/en/autogen/plugin_api/completions.txt
index a28833915..33680a6a1 100644
--- a/doc/en/autogen/plugin_api/completions.txt
+++ b/doc/en/autogen/plugin_api/completions.txt
@@ -10,6 +10,8 @@
| aspell | aspell_langs | list of all languages supported by aspell
+| exec | exec_commands_ids | ids (numbers and names) of executed commands
+
| guile | guile_script | list of scripts
| irc | irc_channel | current IRC channel
diff --git a/doc/en/autogen/plugin_api/infos.txt b/doc/en/autogen/plugin_api/infos.txt
index ef961b510..0a743ba48 100644
--- a/doc/en/autogen/plugin_api/infos.txt
+++ b/doc/en/autogen/plugin_api/infos.txt
@@ -32,6 +32,12 @@
| weechat | charset_terminal | terminal charset | -
+| weechat | color_ansi_regex | POSIX extended regular expression to search ANSI escape codes | -
+
+| weechat | color_rgb2term | RGB color converted to terminal color (0-255) | rgb,limit (limit is optional and is set to 256 by default)
+
+| weechat | color_term2rgb | terminal color (0-255) converted to RGB color | color (terminal color: 0-255)
+
| weechat | cursor_mode | 1 if cursor mode is enabled | -
| weechat | date | WeeChat compilation date | -
diff --git a/doc/en/autogen/user/exec_commands.txt b/doc/en/autogen/user/exec_commands.txt
new file mode 100644
index 000000000..3134547d5
--- /dev/null
+++ b/doc/en/autogen/user/exec_commands.txt
@@ -0,0 +1,53 @@
+[[command_exec_exec]]
+[command]*`exec`* execute external commands::
+
+----
+/exec -list
+ [-sh|-nosh] [-bg|-nobg] [-stdin|-nostdin] [-buffer <name>] [-l|-o|-n] |-sw|-nosw] [-ln|-noln] [-color off|decode|strip] [-rc|-norc] [-timeout <timeout>] [-name <name>] <command>
+ -in <id> <text>
+ -inclose <id> [<text>]
+ -signal <id> <signal>
+ -kill <id>
+ -killall
+ -set <id> <property> <value>
+ -del <id>|-all [<id>...]
+
+ -list: list commands
+ -sh: use the shell to execute the command (default)
+ -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)
+ -bg: run process in background: do not display process output neither return code (not compatible with options -o/-n)
+ -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 (not compatible with option -bg)
+ -n: display output of command in a new buffer (not compatible with option -bg)
+ -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
+ -color: action on ANSI colors in output:
+ ansi: keep ANSI codes as-is
+ decode: convert ANSI colors to WeeChat/IRC (default)
+ 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)
+ 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 a -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.
+----
+
diff --git a/doc/en/autogen/user/exec_options.txt b/doc/en/autogen/user/exec_options.txt
new file mode 100644
index 000000000..598af7a00
--- /dev/null
+++ b/doc/en/autogen/user/exec_options.txt
@@ -0,0 +1,20 @@
+* [[option_exec.color.flag_finished]] *exec.color.flag_finished*
+** description: `text color for a finished command flag in list of commands`
+** type: color
+** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline (default value: `lightred`)
+
+* [[option_exec.color.flag_running]] *exec.color.flag_running*
+** description: `text color for a running command flag in list of commands`
+** type: color
+** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "/" for italic, "_" for underline (default value: `lightgreen`)
+
+* [[option_exec.command.default_options]] *exec.command.default_options*
+** description: `default options for command /exec (see /help exec); example: "-nosh -bg" to run all commands in background (no output), and without using the shell`
+** type: string
+** values: any string (default value: `""`)
+
+* [[option_exec.command.purge_delay]] *exec.command.purge_delay*
+** description: `delay for purging finished commands (in seconds, 0 = purge commands immediately, -1 = never purge)`
+** type: integer
+** values: -1 .. 25920000 (default value: `0`)
+
diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt
index 46ecba0f3..ddacf906a 100644
--- a/doc/en/autogen/user/weechat_commands.txt
+++ b/doc/en/autogen/user/weechat_commands.txt
@@ -131,14 +131,19 @@ Examples:
/color alias <color> <name>
unalias <color>
reset
+ term2rgb <color>
+ rgb2term <rgb> [<limit>]
-o
- alias: add an alias for a color
-unalias: delete an alias
- color: color number (greater than or equal to 0, max depends on terminal, commonly 63 or 255)
- name: alias name for color (for example: "orange")
- reset: reset all color pairs (required when no more color pairs are available if automatic reset is disabled, see option weechat.look.color_pairs_auto_reset)
- -o: send terminal/colors info to current buffer as input
+ alias: add an alias for a color
+ unalias: delete an alias
+ color: color number (greater than or equal to 0, max depends on terminal, commonly 63 or 255)
+ name: alias name for color (for example: "orange")
+ reset: reset all color pairs (required when no more color pairs are available if automatic reset is disabled, see option weechat.look.color_pairs_auto_reset)
+term2rgb: convert a terminal color (0-255) to RGB color
+rgb2term: convert a RGB color to terminal color (0-255)
+ limit: number of colors to use in terminal table (starting from 0); default is 256
+ -o: send terminal/colors info to current buffer as input
Without argument, this command displays colors in a new buffer.
diff --git a/doc/en/weechat_user.en.txt b/doc/en/weechat_user.en.txt
index 0bbbd9cc4..6df248f22 100644
--- a/doc/en/weechat_user.en.txt
+++ b/doc/en/weechat_user.en.txt
@@ -1927,6 +1927,33 @@ To see all charsets used, use following command:
For any problem with charsets, please look at 'WeeChat FAQ'.
+[[exec_plugin]]
+=== Exec plugin
+
+The `/exec` command lets you execute external commands inside WeeChat and
+display the output locally, or send it to a buffer.
+
+[[exec_options]]
+==== Options (exec.conf)
+
+Sections:
+
+[width="100%",cols="3m,6m,16",options="header"]
+|===
+| Section | Control command | Description
+| command | /set exec.command.* | Options for commands
+| color | /set exec.color.* | Colors
+|===
+
+Options:
+
+include::autogen/user/exec_options.txt[]
+
+[[exec_commands]]
+==== Commands
+
+include::autogen/user/exec_commands.txt[]
+
[[fifo_plugin]]
=== Fifo plugin