WeeChat DevCenter

Tag - exec

Entries feed

Saturday, March 15 2014

Exec plugin

A new plugin called "exec" has been added, with command /exec.

The command /exec can execute external commands and display output in WeeChat.

It is similar to /shell (script shell.py), with major improvements:

  • run many commands at once,
  • send signals to commands,
  • send data on stdin of a command,
  • line numbers in output,
  • ANSI color support,
  • command timeout.

Other features coming soon: pipe output to WeeChat command or hsignal (to use in a trigger).

Friday, March 6 2009

New hook "process"

New hook type "process" has been added to WeeChat. You can use it in C plugins, and all scripts languages (perl, python, ruby, lua and tcl).

It runs a command with fork, and send you result (return code, stdout and stderr) via a callback, when command has ended, or if WeeChat output buffer is full (then it will be partial result of command). There is optional timeout (in milliseconds), to kill process if it's still running after given time.

The script shell.py has been updated to use that new hook.