You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3068 lines
110 KiB

  1. //
  2. // This file is auto-generated by script docgen.py.
  3. // DO NOT EDIT BY HAND!
  4. //
  5. // tag::irc_commands[]
  6. [[command_irc_admin]]
  7. * `+admin+`: find information about the administrator of the server
  8. ----
  9. /admin [<target>]
  10. target: server name
  11. ----
  12. [[command_irc_allchan]]
  13. * `+allchan+`: execute a command on all channels of all connected servers
  14. ----
  15. /allchan [-current] [-parted] [-exclude=<channel>[,<channel>...]] <command>
  16. [-current] [-parted] -include=<channel>[,<channel>...] <command>
  17. -current: execute command for channels of current server only
  18. -parted: execute on parted channels only
  19. -exclude: exclude some channels (wildcard "*" is allowed)
  20. -include: include only some channels (wildcard "*" is allowed)
  21. command: command to execute (or text to send to buffer if command does not start with '/')
  22. Command and arguments are evaluated (see /help eval), the following variables are replaced:
  23. $server server name
  24. $channel channel name
  25. $nick nick on server
  26. ${irc_server.xxx} variable xxx in server
  27. ${irc_channel.xxx} variable xxx in channel
  28. Examples:
  29. execute '/me is testing' on all channels:
  30. /allchan /me is testing
  31. say 'hello' everywhere but not on #weechat:
  32. /allchan -exclude=#weechat hello
  33. say 'hello' everywhere but not on #weechat and channels beginning with #linux:
  34. /allchan -exclude=#weechat,#linux* hello
  35. say 'hello' on all channels beginning with #linux:
  36. /allchan -include=#linux* hello
  37. close all buffers with parted channels:
  38. /allchan -parted /close
  39. ----
  40. [[command_irc_allpv]]
  41. * `+allpv+`: execute a command on all private buffers of all connected servers
  42. ----
  43. /allpv [-current] [-exclude=<nick>[,<nick>...]] <command>
  44. [-current] -include=<nick>[,<nick>...] <command>
  45. -current: execute command for private buffers of current server only
  46. -exclude: exclude some nicks (wildcard "*" is allowed)
  47. -include: include only some nicks (wildcard "*" is allowed)
  48. command: command to execute (or text to send to buffer if command does not start with '/')
  49. Command and arguments are evaluated (see /help eval), the following variables are replaced:
  50. $server server name
  51. $channel channel name
  52. $nick nick on server
  53. ${irc_server.xxx} variable xxx in server
  54. ${irc_channel.xxx} variable xxx in channel
  55. Examples:
  56. execute '/me is testing' on all private buffers:
  57. /allpv /me is testing
  58. say 'hello' everywhere but not for nick foo:
  59. /allpv -exclude=foo hello
  60. say 'hello' everywhere but not for nick foo and nicks beginning with bar:
  61. /allpv -exclude=foo,bar* hello
  62. say 'hello' for all nicks beginning with bar:
  63. /allpv -include=bar* hello
  64. close all private buffers:
  65. /allpv /close
  66. ----
  67. [[command_irc_allserv]]
  68. * `+allserv+`: execute a command on all connected servers
  69. ----
  70. /allserv [-exclude=<server>[,<server>...]] <command>
  71. -include=<server>[,<server>...] <command>
  72. -exclude: exclude some servers (wildcard "*" is allowed)
  73. -include: include only some servers (wildcard "*" is allowed)
  74. command: command to execute (or text to send to buffer if command does not start with '/')
  75. Command and arguments are evaluated (see /help eval), the following variables are replaced:
  76. $server server name
  77. $nick nick on server
  78. ${irc_server.xxx} variable xxx in server
  79. Examples:
  80. change nick on all servers:
  81. /allserv /nick newnick
  82. set away on all servers:
  83. /allserv /away I'm away
  84. do a whois on my nick on all servers:
  85. /allserv /whois $nick
  86. ----
  87. [[command_irc_auth]]
  88. * `+auth+`: authenticate with SASL
  89. ----
  90. /auth [<username> <password>]
  91. username: SASL username (content is evaluated, see /help eval; server options are evaluated with ${irc_server.xxx} and ${server} is replaced by the server name)
  92. password: SASL password or path to file with private key (content is evaluated, see /help eval; server options are evaluated with ${irc_server.xxx} and ${server} is replaced by the server name)
  93. If username and password are not provided, the values from server options "sasl_username" and "sasl_password" (or "sasl_key") are used.
  94. Examples:
  95. authenticate with username/password defined in the server:
  96. /auth
  97. authenticate as a different user:
  98. /auth user2 password2
  99. authenticate as a different user with mechanism ecdsa-nist256p-challenge:
  100. /auth user2 ${weechat_config_dir}/ecdsa2.pem
  101. ----
  102. [[command_irc_ban]]
  103. * `+ban+`: ban nicks or hosts
  104. ----
  105. /ban [<channel>] [<nick> [<nick>...]]
  106. channel: channel name
  107. nick: nick or host
  108. Without argument, this command displays the ban list for current channel.
  109. ----
  110. [[command_irc_cap]]
  111. * `+cap+`: client capability negotiation
  112. ----
  113. /cap ls
  114. list
  115. req|ack [<capability> [<capability>...]]
  116. end
  117. ls: list the capabilities supported by the server
  118. list: list the capabilities currently enabled
  119. req: request a capability
  120. ack: acknowledge capabilities which require client-side acknowledgement
  121. end: end the capability negotiation
  122. Without argument, "ls" and "list" are sent.
  123. Capabilities supported by WeeChat are: account-notify, away-notify, cap-notify, chghost, extended-join, invite-notify, message-tags, multi-prefix, server-time, setname, userhost-in-names.
  124. The capabilities to automatically enable on servers can be set in option irc.server_default.capabilities (or by server in option irc.server.xxx.capabilities).
  125. Examples:
  126. /cap
  127. /cap req multi-prefix away-notify
  128. ----
  129. [[command_irc_connect]]
  130. * `+connect+`: connect to IRC server(s)
  131. ----
  132. /connect [<server> [<server>...]] [-<option>[=<value>]] [-no<option>] [-nojoin] [-switch]
  133. -all|-auto|-open [-nojoin] [-switch]
  134. server: server name, which can be:
  135. - internal server name (added by /server add, recommended usage)
  136. - hostname/port or IP/port, port is 6667 by default
  137. - URL with format: irc[6][s]://[nickname[:password]@]irc.example.org[:port][/#channel1][,#channel2[...]]
  138. Note: for an address/IP/URL, a temporary server is added (NOT SAVED), see /help irc.look.temporary_servers
  139. option: set option for server (for boolean option, value can be omitted)
  140. nooption: set boolean option to 'off' (for example: -nossl)
  141. -all: connect to all servers defined in configuration
  142. -auto: connect to servers with autoconnect enabled
  143. -open: connect to all opened servers that are not currently connected
  144. -nojoin: do not join any channel (even if autojoin is enabled on server)
  145. -switch: switch to next server address
  146. To disconnect from a server or stop any connection attempt, use command /disconnect.
  147. Examples:
  148. /connect libera
  149. /connect irc.oftc.net/6667
  150. /connect irc6.oftc.net/6667 -ipv6
  151. /connect irc6.oftc.net/6697 -ipv6 -ssl
  152. /connect my.server.org/6697 -ssl -password=test
  153. /connect irc://nick@irc.oftc.net/#channel
  154. /connect -switch
  155. ----
  156. [[command_irc_ctcp]]
  157. * `+ctcp+`: send a CTCP message (Client-To-Client Protocol)
  158. ----
  159. /ctcp [-server <server>] <target>[,<target>...] <type> [<arguments>]
  160. server: send to this server (internal name)
  161. target: nick or channel ('*' = current channel)
  162. type: CTCP type (examples: "version", "ping", etc.)
  163. arguments: arguments for CTCP
  164. Examples:
  165. /ctcp toto time
  166. /ctcp toto version
  167. /ctcp * version
  168. ----
  169. [[command_irc_cycle]]
  170. * `+cycle+`: leave and rejoin a channel
  171. ----
  172. /cycle [<channel>[,<channel>...]] [<message>]
  173. channel: channel name
  174. message: part message (displayed to other users)
  175. ----
  176. [[command_irc_dcc]]
  177. * `+dcc+`: start a DCC (file transfer or direct chat)
  178. ----
  179. /dcc chat <nick>
  180. send <nick> <file>
  181. nick: nick
  182. file: filename (on local host)
  183. Examples:
  184. chat with nick "toto":
  185. /dcc chat toto
  186. send file "/home/foo/bar.txt" to nick "toto":
  187. /dcc send toto /home/foo/bar.txt
  188. ----
  189. [[command_irc_dehalfop]]
  190. * `+dehalfop+`: remove channel half-operator status from nick(s)
  191. ----
  192. /dehalfop <nick> [<nick>...]
  193. * -yes
  194. nick: nick or mask (wildcard "*" is allowed)
  195. *: remove channel half-operator status from everybody on channel except yourself
  196. ----
  197. [[command_irc_deop]]
  198. * `+deop+`: remove channel operator status from nick(s)
  199. ----
  200. /deop <nick> [<nick>...]
  201. * -yes
  202. nick: nick or mask (wildcard "*" is allowed)
  203. *: remove channel operator status from everybody on channel except yourself
  204. ----
  205. [[command_irc_devoice]]
  206. * `+devoice+`: remove voice from nick(s)
  207. ----
  208. /devoice <nick> [<nick>...]
  209. * -yes
  210. nick: nick or mask (wildcard "*" is allowed)
  211. *: remove voice from everybody on channel
  212. ----
  213. [[command_irc_die]]
  214. * `+die+`: shutdown the server
  215. ----
  216. /die [<target>]
  217. target: server name
  218. ----
  219. [[command_irc_disconnect]]
  220. * `+disconnect+`: disconnect from one or all IRC servers
  221. ----
  222. /disconnect [<server>|-all|-pending [<reason>]]
  223. server: internal server name
  224. -all: disconnect from all servers
  225. -pending: cancel auto-reconnection on servers currently reconnecting
  226. reason: reason for the "quit"
  227. ----
  228. [[command_irc_halfop]]
  229. * `+halfop+`: give channel half-operator status to nick(s)
  230. ----
  231. /halfop <nick> [<nick>...]
  232. * -yes
  233. nick: nick or mask (wildcard "*" is allowed)
  234. *: give channel half-operator status to everybody on channel
  235. ----
  236. [[command_irc_ignore]]
  237. * `+ignore+`: ignore nicks/hosts from servers or channels
  238. ----
  239. /ignore list
  240. add [re:]<nick> [<server> [<channel>]]
  241. del <number>|-all
  242. list: list all ignores
  243. add: add an ignore
  244. nick: nick or hostname (can be a POSIX extended regular expression if "re:" is given or a mask using "*" to replace zero or more chars)
  245. del: delete an ignore
  246. number: number of ignore to delete (look at list to find it)
  247. -all: delete all ignores
  248. server: internal server name where ignore is working
  249. channel: channel name where ignore is working
  250. Note: the regular expression can start with "(?-i)" to become case sensitive.
  251. Examples:
  252. ignore nick "toto" everywhere:
  253. /ignore add toto
  254. ignore host "toto@domain.com" on libera server:
  255. /ignore add toto@domain.com libera
  256. ignore host "toto*@*.domain.com" on libera/#weechat:
  257. /ignore add toto*@*.domain.com libera #weechat
  258. ----
  259. [[command_irc_info]]
  260. * `+info+`: get information describing the server
  261. ----
  262. /info [<target>]
  263. target: server name
  264. ----
  265. [[command_irc_invite]]
  266. * `+invite+`: invite a nick on a channel
  267. ----
  268. /invite <nick> [<nick>...] [<channel>]
  269. nick: nick
  270. channel: channel name
  271. ----
  272. [[command_irc_ison]]
  273. * `+ison+`: check if a nick is currently on IRC
  274. ----
  275. /ison <nick> [<nick>...]
  276. nick: nick
  277. ----
  278. [[command_irc_join]]
  279. * `+join+`: join a channel
  280. ----
  281. /join [-noswitch] [-server <server>] [<channel1>[,<channel2>...]] [<key1>[,<key2>...]]
  282. -noswitch: do not switch to new buffer
  283. server: send to this server (internal name)
  284. channel: channel name to join
  285. key: key to join the channel (channels with a key must be the first in list)
  286. Examples:
  287. /join #weechat
  288. /join #protectedchan,#weechat key
  289. /join -server libera #weechat
  290. /join -noswitch #weechat
  291. ----
  292. [[command_irc_kick]]
  293. * `+kick+`: kick a user out of a channel
  294. ----
  295. /kick [<channel>] <nick> [<reason>]
  296. channel: channel name
  297. nick: nick
  298. reason: reason (evaluated, see /help eval; special variables ${nick} (self nick), ${target} (target nick), ${channel} and ${server} are replaced by their values)
  299. ----
  300. [[command_irc_kickban]]
  301. * `+kickban+`: kick a user out of a channel and ban the host
  302. ----
  303. /kickban [<channel>] <nick> [<reason>]
  304. channel: channel name
  305. nick: nick
  306. reason: reason (evaluated, see /help eval; special variables ${nick} (self nick), ${target} (target nick), ${channel} and ${server} are replaced by their values)
  307. It is possible to kick/ban with a mask, nick will be extracted from mask and replaced by "*".
  308. Example:
  309. ban "*!*@host.com" and then kick "toto":
  310. /kickban toto!*@host.com
  311. ----
  312. [[command_irc_kill]]
  313. * `+kill+`: close client-server connection
  314. ----
  315. /kill <nick> [<reason>]
  316. nick: nick
  317. reason: reason
  318. ----
  319. [[command_irc_links]]
  320. * `+links+`: list all server names which are known by the server answering the query
  321. ----
  322. /links [[<target>] <server_mask>]
  323. target: this remote server should answer the query
  324. server_mask: list of servers must match this mask
  325. ----
  326. [[command_irc_list]]
  327. * `+list+`: list channels and their topics
  328. ----
  329. /list [-server <server>] [-re <regex>] [<channel>[,<channel>...]] [<target>]
  330. server: send to this server (internal name)
  331. regex: POSIX extended regular expression used to filter results (case insensitive, can start by "(?-i)" to become case sensitive)
  332. channel: channel to list
  333. target: server name
  334. Examples:
  335. list all channels on server (can be very slow on large networks):
  336. /list
  337. list channel #weechat:
  338. /list #weechat
  339. list all channels beginning with "#weechat" (can be very slow on large networks):
  340. /list -re #weechat.*
  341. ----
  342. [[command_irc_lusers]]
  343. * `+lusers+`: get statistics about the size of the IRC network
  344. ----
  345. /lusers [<mask> [<target>]]
  346. mask: servers matching the mask only
  347. target: server for forwarding request
  348. ----
  349. [[command_irc_map]]
  350. * `+map+`: show a graphical map of the IRC network
  351. ----
  352. ----
  353. [[command_irc_me]]
  354. * `+me+`: send a CTCP action to the current channel
  355. ----
  356. /me <message>
  357. message: message to send
  358. ----
  359. [[command_irc_mode]]
  360. * `+mode+`: change channel or user mode
  361. ----
  362. /mode [<channel>] [+|-]o|p|s|i|t|n|m|l|b|e|v|k [<arguments>]
  363. <nick> [+|-]i|s|w|o
  364. channel modes:
  365. channel: channel name to modify (default is current one)
  366. o: give/take channel operator privileges
  367. p: private channel flag
  368. s: secret channel flag
  369. i: invite-only channel flag
  370. t: topic settable by channel operator only flag
  371. n: no messages to channel from clients on the outside
  372. m: moderated channel
  373. l: set the user limit to channel
  374. b: set a ban mask to keep users out
  375. e: set exception mask
  376. v: give/take the ability to speak on a moderated channel
  377. k: set a channel key (password)
  378. user modes:
  379. nick: nick to modify
  380. i: mark a user as invisible
  381. s: mark a user for receive server notices
  382. w: user receives wallops
  383. o: operator flag
  384. List of modes is not comprehensive, you should read documentation about your server to see all possible modes.
  385. Examples:
  386. protect topic on channel #weechat:
  387. /mode #weechat +t
  388. become invisible on server:
  389. /mode nick +i
  390. ----
  391. [[command_irc_motd]]
  392. * `+motd+`: get the "Message Of The Day"
  393. ----
  394. /motd [<target>]
  395. target: server name
  396. ----
  397. [[command_irc_msg]]
  398. * `+msg+`: send message to a nick or channel
  399. ----
  400. /msg [-server <server>] <target>[,<target>...] <text>
  401. server: send to this server (internal name)
  402. target: nick or channel (may be mask, '*' = current channel)
  403. text: text to send
  404. ----
  405. [[command_irc_names]]
  406. * `+names+`: list nicks on channels
  407. ----
  408. /names [<channel>[,<channel>...]]
  409. channel: channel name
  410. ----
  411. [[command_irc_nick]]
  412. * `+nick+`: change current nick
  413. ----
  414. /nick [-all] <nick>
  415. -all: set new nick for all connected servers
  416. nick: new nick
  417. ----
  418. [[command_irc_notice]]
  419. * `+notice+`: send notice message to user
  420. ----
  421. /notice [-server <server>] <target> <text>
  422. server: send to this server (internal name)
  423. target: nick or channel name
  424. text: text to send
  425. ----
  426. [[command_irc_notify]]
  427. * `+notify+`: add a notification for presence or away status of nicks on servers
  428. ----
  429. /notify add <nick> [<server> [-away]]
  430. del <nick>|-all [<server>]
  431. add: add a notification
  432. nick: nick
  433. server: internal server name (by default current server)
  434. -away: notify when away message is changed (by doing whois on nick)
  435. del: delete a notification
  436. -all: delete all notifications
  437. Without argument, this command displays notifications for current server (or all servers if command is issued on core buffer).
  438. Examples:
  439. notify when "toto" joins/quits current server:
  440. /notify add toto
  441. notify when "toto" joins/quits libera server:
  442. /notify add toto libera
  443. notify when "toto" is away or back on libera server:
  444. /notify add toto libera -away
  445. ----
  446. [[command_irc_op]]
  447. * `+op+`: give channel operator status to nick(s)
  448. ----
  449. /op <nick> [<nick>...]
  450. * -yes
  451. nick: nick or mask (wildcard "*" is allowed)
  452. *: give channel operator status to everybody on channel
  453. ----
  454. [[command_irc_oper]]
  455. * `+oper+`: get operator privileges
  456. ----
  457. /oper <user> <password>
  458. user: user
  459. password: password
  460. ----
  461. [[command_irc_part]]
  462. * `+part+`: leave a channel
  463. ----
  464. /part [<channel>[,<channel>...]] [<message>]
  465. channel: channel name to leave
  466. message: part message (displayed to other users)
  467. ----
  468. [[command_irc_ping]]
  469. * `+ping+`: send a ping to server
  470. ----
  471. /ping <target1> [<target2>]
  472. target1: server
  473. target2: forward ping to this server
  474. ----
  475. [[command_irc_pong]]
  476. * `+pong+`: answer to a ping message
  477. ----
  478. /pong <daemon> [<daemon2>]
  479. daemon: daemon who has responded to Ping message
  480. daemon2: forward message to this daemon
  481. ----
  482. [[command_irc_query]]
  483. * `+query+`: send a private message to a nick
  484. ----
  485. /query [-noswitch] [-server <server>] <nick>[,<nick>...] [<text>]
  486. -noswitch: do not switch to new buffer
  487. server: send to this server (internal name)
  488. nick: nick
  489. text: text to send
  490. ----
  491. [[command_irc_quiet]]
  492. * `+quiet+`: quiet nicks or hosts
  493. ----
  494. /quiet [<channel>] [<nick> [<nick>...]]
  495. channel: channel name
  496. nick: nick or host
  497. Without argument, this command displays the quiet list for current channel.
  498. ----
  499. [[command_irc_quote]]
  500. * `+quote+`: send raw data to server without parsing
  501. ----
  502. /quote [-server <server>] <data>
  503. server: send to this server (internal name)
  504. data: raw data to send
  505. ----
  506. [[command_irc_reconnect]]
  507. * `+reconnect+`: reconnect to server(s)
  508. ----
  509. /reconnect <server> [<server>...] [-nojoin] [-switch]
  510. -all [-nojoin] [-switch]
  511. server: server to reconnect (internal name)
  512. -all: reconnect to all servers
  513. -nojoin: do not join any channel (even if autojoin is enabled on server)
  514. -switch: switch to next server address
  515. ----
  516. [[command_irc_rehash]]
  517. * `+rehash+`: tell the server to reload its config file
  518. ----
  519. /rehash [<option>]
  520. option: extra option, for some servers
  521. ----
  522. [[command_irc_remove]]
  523. * `+remove+`: force a user to leave a channel
  524. ----
  525. /remove [<channel>] <nick> [<reason>]
  526. channel: channel name
  527. nick: nick
  528. reason: reason (special variables $nick, $channel and $server are replaced by their values)
  529. ----
  530. [[command_irc_restart]]
  531. * `+restart+`: tell the server to restart itself
  532. ----
  533. /restart [<target>]
  534. target: server name
  535. ----
  536. [[command_irc_sajoin]]
  537. * `+sajoin+`: force a user to join channel(s)
  538. ----
  539. /sajoin <nick> <channel>[,<channel>...]
  540. nick: nick
  541. channel: channel name
  542. ----
  543. [[command_irc_samode]]
  544. * `+samode+`: change mode on channel, without having operator status
  545. ----
  546. /samode [<channel>] <mode>
  547. channel: channel name
  548. mode: mode for channel
  549. ----
  550. [[command_irc_sanick]]
  551. * `+sanick+`: force a user to use another nick
  552. ----
  553. /sanick <nick> <new_nick>
  554. nick: nick
  555. new_nick: new nick
  556. ----
  557. [[command_irc_sapart]]
  558. * `+sapart+`: force a user to leave channel(s)
  559. ----
  560. /sapart <nick> <channel>[,<channel>...]
  561. nick: nick
  562. channel: channel name
  563. ----
  564. [[command_irc_saquit]]
  565. * `+saquit+`: force a user to quit server with a reason
  566. ----
  567. /saquit <nick> <reason>
  568. nick: nick
  569. reason: reason
  570. ----
  571. [[command_irc_server]]
  572. * `+server+`: list, add or remove IRC servers
  573. ----
  574. /server list|listfull [<name>]
  575. add <name> <hostname>[/<port>] [-temp] [-<option>[=<value>]] [-no<option>]
  576. copy|rename <name> <new_name>
  577. reorder <name> [<name>...]
  578. open <name>|-all [<name>...]
  579. del|keep <name>
  580. deloutq|jump
  581. raw [<filter>]
  582. list: list servers (without argument, this list is displayed)
  583. listfull: list servers with detailed info for each server
  584. add: add a new server
  585. name: server name, for internal and display use; this name is used to connect to the server (/connect name) and to set server options: irc.server.name.xxx
  586. hostname: name or IP address of server, with optional port (default: 6667), many addresses can be separated by a comma
  587. -temp: add a temporary server (not saved)
  588. option: set option for server (for boolean option, value can be omitted)
  589. nooption: set boolean option to 'off' (for example: -nossl)
  590. copy: duplicate a server
  591. rename: rename a server
  592. reorder: reorder list of servers
  593. open: open the server buffer without connecting
  594. keep: keep server in config file (for temporary servers only)
  595. del: delete a server
  596. deloutq: delete messages out queue for all servers (all messages WeeChat is currently sending)
  597. jump: jump to server buffer
  598. raw: open buffer with raw IRC data
  599. filter: set a new filter to see only matching messages (this filter can be used as input in raw IRC data buffer as well); allowed formats are:
  600. * show all messages (no filter)
  601. xxx show only messages containing "xxx"
  602. s:xxx show only messages for server "xxx"
  603. f:xxx show only messages with a flag: recv (message received), sent (message sent), modified (message modified by a modifier), redirected (message redirected)
  604. m:xxx show only IRC command "xxx"
  605. c:xxx show only messages matching the evaluated condition "xxx", using following variables: output of function irc_message_parse (like nick, command, channel, text, etc., see function info_get_hashtable in plugin API reference for the list of all variables), date (format: "yyyy-mm-dd hh:mm:ss"), server, recv, sent, modified, redirected
  606. Examples:
  607. /server listfull
  608. /server add libera irc.libera.chat
  609. /server add libera irc.libera.chat/6697 -ssl -autoconnect
  610. /server add chatspike irc.chatspike.net/6667,irc.duckspike.net/6667
  611. /server copy libera libera-test
  612. /server rename libera-test libera2
  613. /server reorder libera2 libera
  614. /server del libera
  615. /server deloutq
  616. /server raw
  617. /server raw s:libera
  618. /server raw c:${recv} && ${command}==PRIVMSG && ${nick}==foo
  619. ----
  620. [[command_irc_service]]
  621. * `+service+`: register a new service
  622. ----
  623. /service <nick> <reserved> <distribution> <type> <reserved> <info>
  624. distribution: visibility of service
  625. type: reserved for future usage
  626. ----
  627. [[command_irc_servlist]]
  628. * `+servlist+`: list services currently connected to the network
  629. ----
  630. /servlist [<mask> [<type>]]
  631. mask: list only services matching this mask
  632. type: list only services of this type
  633. ----
  634. [[command_irc_setname]]
  635. * `+setname+`: set real name
  636. ----
  637. /setname <realname>
  638. realname: new real name
  639. ----
  640. [[command_irc_squery]]
  641. * `+squery+`: deliver a message to a service
  642. ----
  643. /squery <service> <text>
  644. service: name of service
  645. text: text to send
  646. ----
  647. [[command_irc_squit]]
  648. * `+squit+`: disconnect server links
  649. ----
  650. /squit <target> <comment>
  651. target: server name
  652. comment: comment
  653. ----
  654. [[command_irc_stats]]
  655. * `+stats+`: query statistics about server
  656. ----
  657. /stats [<query> [<target>]]
  658. query: c/h/i/k/l/m/o/y/u (see RFC1459)
  659. target: server name
  660. ----
  661. [[command_irc_summon]]
  662. * `+summon+`: give users who are on a host running an IRC server a message asking them to please join IRC
  663. ----
  664. /summon <user> [<target> [<channel>]]
  665. user: username
  666. target: server name
  667. channel: channel name
  668. ----
  669. [[command_irc_time]]
  670. * `+time+`: query local time from server
  671. ----
  672. /time [<target>]
  673. target: query time from specified server
  674. ----
  675. [[command_irc_topic]]
  676. * `+topic+`: get/set channel topic
  677. ----
  678. /topic [<channel>] [<topic>|-delete]
  679. channel: channel name
  680. topic: new topic
  681. -delete: delete channel topic
  682. ----
  683. [[command_irc_trace]]
  684. * `+trace+`: find the route to specific server
  685. ----
  686. /trace [<target>]
  687. target: server name
  688. ----
  689. [[command_irc_unban]]
  690. * `+unban+`: unban nicks or hosts
  691. ----
  692. /unban [<channel>] <nick>|<number> [<nick>|<number>...]
  693. channel: channel name
  694. nick: nick or host
  695. number: ban number (as displayed by command /ban)
  696. ----
  697. [[command_irc_unquiet]]
  698. * `+unquiet+`: unquiet nicks or hosts
  699. ----
  700. /unquiet [<channel>] <nick>|<number> [<nick>|<number>...]
  701. channel: channel name
  702. nick: nick or host
  703. number: quiet number (as displayed by command /quiet)
  704. ----
  705. [[command_irc_userhost]]
  706. * `+userhost+`: return a list of information about nicks
  707. ----
  708. /userhost <nick> [<nick>...]
  709. nick: nick
  710. ----
  711. [[command_irc_users]]
  712. * `+users+`: list of users logged into the server
  713. ----
  714. /users [<target>]
  715. target: server name
  716. ----
  717. [[command_irc_version]]
  718. * `+version+`: give the version info of nick or server (current or specified)
  719. ----
  720. /version [<target>|<nick>]
  721. target: server name
  722. nick: nick
  723. ----
  724. [[command_irc_voice]]
  725. * `+voice+`: give voice to nick(s)
  726. ----
  727. /voice <nick> [<nick>...]
  728. * -yes
  729. nick: nick or mask (wildcard "*" is allowed)
  730. *: give voice to everybody on channel
  731. ----
  732. [[command_irc_wallchops]]
  733. * `+wallchops+`: send a notice to channel ops
  734. ----
  735. /wallchops [<channel>] <text>
  736. channel: channel name
  737. text: text to send
  738. ----
  739. [[command_irc_wallops]]
  740. * `+wallops+`: send a message to all currently connected users who have set the 'w' user mode for themselves
  741. ----
  742. /wallops <text>
  743. text: text to send
  744. ----
  745. [[command_irc_who]]
  746. * `+who+`: generate a query which returns a list of information
  747. ----
  748. /who [<mask> [o]]
  749. mask: only information which match this mask
  750. o: only operators are returned according to the mask supplied
  751. ----
  752. [[command_irc_whois]]
  753. * `+whois+`: query information about user(s)
  754. ----
  755. /whois [<target>] [<nick>[,<nick>...]]
  756. target: server name
  757. nick: nick (may be a mask)
  758. Without argument, this command will do a whois on:
  759. - your own nick if buffer is a server/channel
  760. - remote nick if buffer is a private.
  761. If option irc.network.whois_double_nick is enabled, two nicks are sent (if only one nick is given), to get idle time in answer.
  762. ----
  763. [[command_irc_whowas]]
  764. * `+whowas+`: ask for information about a nick which no longer exists
  765. ----
  766. /whowas <nick>[,<nick>...] [<count> [<target>]]
  767. nick: nick
  768. count: number of replies to return (full search if negative number)
  769. target: reply should match this mask
  770. ----
  771. // end::irc_commands[]
  772. // tag::alias_commands[]
  773. [[command_alias_alias]]
  774. * `+alias+`: list, add or remove command aliases
  775. ----
  776. /alias list [<alias>]
  777. add <alias> [<command>[;<command>...]]
  778. addcompletion <completion> <alias> [<command>[;<command>...]]
  779. del <alias> [<alias>...]
  780. list: list aliases (without argument, this list is displayed)
  781. add: add an alias
  782. addcompletion: add an alias with a custom completion
  783. del: delete an alias
  784. completion: completion for alias: by default completion is done with target command
  785. note: you can use %%command to use completion of an existing command
  786. alias: name of alias
  787. command: command name with arguments (many commands can be separated by semicolons)
  788. Note: in command, special variables are replaced:
  789. $n: argument 'n' (between 1 and 9)
  790. $-m: arguments from 1 to 'm'
  791. $n-: arguments from 'n' to last
  792. $n-m: arguments from 'n' to 'm'
  793. $*: all arguments
  794. $~: last argument
  795. $var: where "var" is a local variable of buffer (see /buffer listvar)
  796. examples: $nick, $channel, $server, $plugin, $name
  797. Examples:
  798. alias /split to split window horizontally:
  799. /alias add split /window splith
  800. alias /hello to say "hello" on all channels but not on #weechat:
  801. /alias add hello /allchan -exclude=#weechat hello
  802. alias /forcejoin to send IRC command "forcejoin" with completion of /sajoin:
  803. /alias addcompletion %%sajoin forcejoin /quote forcejoin
  804. ----
  805. // end::alias_commands[]
  806. // tag::weechat_commands[]
  807. [[command_weechat_away]]
  808. * `+away+`: set or remove away status
  809. ----
  810. /away [-all] [<message>]
  811. -all: set or remove away status on all connected servers
  812. message: message for away (if no message is given, away status is removed)
  813. ----
  814. [[command_weechat_bar]]
  815. * `+bar+`: manage bars
  816. ----
  817. /bar list|listfull|listitems
  818. add <name> <type>[,<conditions>] <position> <size> <separator> <item1>[,<item2>...]
  819. default [input|title|status|nicklist]
  820. del <name>|-all
  821. set <name> <option> <value>
  822. hide|show|toggle <name>
  823. scroll <name> <window> <scroll_value>
  824. list: list all bars
  825. listfull: list all bars (verbose)
  826. listitems: list all bar items
  827. add: add a new bar
  828. name: name of bar (must be unique)
  829. type: root: outside windows,
  830. window: inside windows, with optional conditions (see below)
  831. conditions: the conditions to display the bar:
  832. active: on active window
  833. inactive: on inactive windows
  834. nicklist: on windows with nicklist
  835. other condition: see /help weechat.bar.xxx.conditions and /help eval
  836. without conditions, the bar is always displayed
  837. position: bottom, top, left or right
  838. size: size of bar (in chars)
  839. separator: 1 for using separator (line), 0 or nothing means no separator
  840. item1,...: items for this bar (items can be separated by comma (space between items) or "+" (glued items))
  841. default: create a default bar (all default bars if no bar name is given)
  842. del: delete a bar (or all bars with -all)
  843. set: set a value for a bar property
  844. option: option to change (for options list, look at /set weechat.bar.<barname>.*)
  845. value: new value for option
  846. hide: hide a bar
  847. show: show an hidden bar
  848. toggle: hide/show a bar
  849. scroll: scroll bar
  850. window: window number (use '*' for current window or for root bars)
  851. scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', '-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to scroll by % of width/height, otherwise value is number of chars)
  852. Examples:
  853. create a bar with time, buffer number + name, and completion:
  854. /bar add mybar root bottom 1 0 [time],buffer_number+:+buffer_name,completion
  855. hide a bar:
  856. /bar hide mybar
  857. scroll nicklist 10 lines down on current buffer:
  858. /bar scroll nicklist * y+10
  859. scroll to end of nicklist on current buffer:
  860. /bar scroll nicklist * ye
  861. ----
  862. [[command_weechat_buffer]]
  863. * `+buffer+`: manage buffers
  864. ----
  865. /buffer list
  866. add [-free] [-switch] <name>
  867. clear [<number>|<name>|-merged|-all [<number>|<name>...]]
  868. move <number>|-|+
  869. swap <number1>|<name1> [<number2>|<name2>]
  870. cycle <number>|<name> [<number>|<name>...]
  871. merge <number>|<name>
  872. unmerge [<number>|-all]
  873. hide [<number>|<name>|-all [<number>|<name>...]]
  874. unhide [<number>|<name>|-all [<number>|<name>...]]
  875. renumber [<number1> [<number2> [<start>]]]
  876. close [<n1>[-<n2>]|<name>...]
  877. notify [<level>]
  878. listvar [<number>|<name>]
  879. setvar <name> [<value>]
  880. delvar <name>
  881. set <property> [<value>]
  882. get <property>
  883. <number>|-|+|<name>
  884. list: list buffers (without argument, this list is displayed)
  885. add: add a new buffer (it can be closed with "/buffer close" or input "q")
  886. clear: clear buffer content (number for a buffer, -merged for merged buffers, -all for all buffers, or nothing for current buffer)
  887. move: move buffer in the list (may be relative, for example -1); "-" = move to first buffer number, "+" = move to last buffer number + 1
  888. swap: swap two buffers (swap with current buffer if only one number/name given)
  889. cycle: jump loop between a list of buffers
  890. merge: merge current buffer to another buffer (chat area will be mix of both buffers)
  891. (by default ctrl-x switches between merged buffers)
  892. unmerge: unmerge buffer from other buffers which have same number
  893. hide: hide the buffer
  894. unhide: unhide the buffer
  895. renumber: renumber buffers (works only if option weechat.look.buffer_auto_renumber is off)
  896. close: close buffer (number/range or name is optional)
  897. notify: display or set notify level for current buffer: this level determines whether buffer will be added to hotlist or not:
  898. none: never
  899. highlight: for highlights only
  900. message: for messages from users + highlights
  901. all: all messages
  902. reset: reset to default value (all)
  903. listvar: display local variables in a buffer
  904. setvar: set a local variable in the current buffer
  905. delvar: delete a local variable from the current buffer
  906. set: set a property in the current buffer
  907. get: display a property of current buffer
  908. number: jump to buffer by number, possible prefix:
  909. '+': relative jump, add number to current
  910. '-': relative jump, sub number to current
  911. '*': jump to number, using option "weechat.look.jump_current_to_previous_buffer"
  912. -: jump to first buffer number
  913. +: jump to last buffer number
  914. name: jump to buffer by (partial) name
  915. Examples:
  916. clear current buffer:
  917. /buffer clear
  918. move buffer to number 5:
  919. /buffer move 5
  920. swap buffer 1 with 3:
  921. /buffer swap 1 3
  922. swap buffer #weechat with current buffer:
  923. /buffer swap #weechat
  924. jump on #chan1, #chan2, #chan3 and loop:
  925. /buffer cycle #chan1 #chan2 #chan3
  926. merge with core buffer:
  927. /buffer merge 1
  928. merge with #weechat buffer:
  929. /buffer merge #weechat
  930. unmerge buffer:
  931. /buffer unmerge
  932. close current buffer:
  933. /buffer close
  934. close buffers 5 to 7:
  935. /buffer close 5-7
  936. jump to #weechat:
  937. /buffer #weechat
  938. jump to next buffer:
  939. /buffer +1
  940. jump to last buffer number:
  941. /buffer +
  942. ----
  943. [[command_weechat_color]]
  944. * `+color+`: define color aliases and display palette of colors
  945. ----
  946. /color alias <color> <name>
  947. unalias <color>
  948. reset
  949. term2rgb <color>
  950. rgb2term <rgb> [<limit>]
  951. -o
  952. alias: add an alias for a color
  953. unalias: delete an alias
  954. color: color number (greater than or equal to 0, max depends on terminal, commonly 63 or 255)
  955. name: alias name for color (for example: "orange")
  956. 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")
  957. term2rgb: convert a terminal color (0-255) to RGB color
  958. rgb2term: convert a RGB color to terminal color (0-255)
  959. limit: number of colors to use in terminal table (starting from 0); default is 256
  960. -o: send terminal/colors info to current buffer as input
  961. Without argument, this command displays colors in a new buffer.
  962. Examples:
  963. add alias "orange" for color 214:
  964. /color alias 214 orange
  965. delete color 214:
  966. /color unalias 214
  967. ----
  968. [[command_weechat_command]]
  969. * `+command+`: launch explicit WeeChat or plugin command
  970. ----
  971. /command [-buffer <name>] <plugin> <command>
  972. -buffer: execute the command on this buffer
  973. plugin: execute the command from this plugin; 'core' for a WeeChat command, '*' for automatic plugin (it depends on the buffer where the command is executed)
  974. command: command to execute (a '/' is automatically added if not found at beginning of command)
  975. ----
  976. [[command_weechat_cursor]]
  977. * `+cursor+`: free movement of cursor on screen to execute actions on specific areas of screen
  978. ----
  979. /cursor go chat|<bar>|<x>,<y>
  980. move up|down|left|right|area_up|area_down|area_left|area_right
  981. stop
  982. go: move cursor to chat area, a bar (using bar name) or coordinates "x,y"
  983. move: move cursor with direction
  984. stop: stop cursor mode
  985. Without argument, this command toggles cursor mode.
  986. When mouse is enabled (see /help mouse), by default a middle click will start cursor mode at this point.
  987. Default keys in cursor mode on chat messages:
  988. m quote message
  989. q quote prefix + message
  990. Q quote time + prefix + message
  991. Default keys in cursor mode on nicklist:
  992. b ban nick (/ban)
  993. k kick nick (/kick)
  994. K kick and ban nick (/kickban)
  995. q open query with nick (/query)
  996. w query information about user (/whois)
  997. Other default keys in cursor mode:
  998. arrow move cursor
  999. alt+arrow move cursor to the next area
  1000. enter exit cursor mode
  1001. Examples:
  1002. go to nicklist:
  1003. /cursor go nicklist
  1004. go to coordinates x=10, y=5:
  1005. /cursor go 10,5
  1006. ----
  1007. [[command_weechat_debug]]
  1008. * `+debug+`: debug functions
  1009. ----
  1010. /debug list
  1011. set <plugin> <level>
  1012. dump [<plugin>]
  1013. buffer|color|infolists|libs|certs|memory|tags|term|windows
  1014. mouse|cursor [verbose]
  1015. hdata [free]
  1016. time <command>
  1017. list: list plugins with debug levels
  1018. set: set debug level for plugin
  1019. plugin: name of plugin ("core" for WeeChat core)
  1020. level: debug level for plugin (0 = disable debug)
  1021. dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
  1022. buffer: dump buffer content with hexadecimal values in log file
  1023. color: display infos about current color pairs
  1024. cursor: toggle debug for cursor mode
  1025. dirs: display directories
  1026. hdata: display infos about hdata (with free: remove all hdata in memory)
  1027. hooks: display infos about hooks
  1028. infolists: display infos about infolists
  1029. libs: display infos about external libraries used
  1030. certs: display number of loaded trusted certificate authorities
  1031. memory: display infos about memory usage
  1032. mouse: toggle debug for mouse
  1033. tags: display tags for lines
  1034. term: display infos about terminal
  1035. windows: display windows tree
  1036. time: measure time to execute a command or to send text to the current buffer
  1037. ----
  1038. [[command_weechat_eval]]
  1039. * `+eval+`: evaluate expression
  1040. ----
  1041. /eval [-n|-s] [-d] <expression>
  1042. [-n] [-d [-d]] -c <expression1> <operator> <expression2>
  1043. -n: display result without sending it to buffer (debug mode)
  1044. -s: split expression before evaluating it (many commands can be separated by semicolons)
  1045. -d: display debug output after evaluation (with two -d: more verbose debug)
  1046. -c: evaluate as condition: use operators and parentheses, return a boolean value ("0" or "1")
  1047. expression: expression to evaluate, variables with format ${variable} are replaced (see below); many commands can be separated by semicolons
  1048. operator: a logical or comparison operator:
  1049. - logical operators:
  1050. && boolean "and"
  1051. || boolean "or"
  1052. - comparison operators:
  1053. == equal
  1054. != not equal
  1055. <= less or equal
  1056. < less
  1057. >= greater or equal
  1058. > greater
  1059. =~ is matching POSIX extended regex
  1060. !~ is NOT matching POSIX extended regex
  1061. ==* is matching mask, case sensitive (wildcard "*" is allowed)
  1062. !!* is NOT matching mask, case sensitive (wildcard "*" is allowed)
  1063. =* is matching mask, case insensitive (wildcard "*" is allowed)
  1064. !* is NOT matching mask, case insensitive (wildcard "*" is allowed)
  1065. ==- is included, case sensitive
  1066. !!- is NOT included, case sensitive
  1067. =- is included, case insensitive
  1068. !- is NOT included, case insensitive
  1069. An expression is considered as "true" if it is not NULL, not empty, and different from "0".
  1070. The comparison is made using floating point numbers if the two expressions are valid numbers, with one of the following formats:
  1071. - integer (examples: 5, -7)
  1072. - floating point number (examples: 5.2, -7.5, 2.83e-2)
  1073. - hexadecimal number (examples: 0xA3, -0xA3)
  1074. To force a string comparison, you can add double quotes around each expression, for example:
  1075. 50 > 100 ==> 0
  1076. "50" > "100" ==> 1
  1077. Some variables are replaced in expression, using the format ${variable}, variable can be, by order of priority:
  1078. 1. the string itself without evaluation (format: "raw:xxx")
  1079. 2. an evaluated sub-string (format: "eval:xxx")
  1080. 3. an evaluated condition (format: "eval_cond:xxx")
  1081. 4. a string with escaped chars (format: "esc:xxx" or "\xxx")
  1082. 5. a string with chars to hide (format: "hide:char,string")
  1083. 6. a string with max chars (format: "cut:max,suffix,string" or "cut:+max,suffix,string")
  1084. or max chars displayed on screen (format: "cutscr:max,suffix,string" or "cutscr:+max,suffix,string")
  1085. 7. a reversed string (format: "rev:xxx" or "revscr:xxx")
  1086. 8. a repeated string (format: "repeat:count,string")
  1087. 9. length of a string (format: "length:xxx" or "lengthscr:xxx")
  1088. 10. a color (format: "color:xxx", see "Plugin API reference", function "color")
  1089. 11. a modifier (format: "modifier:name,data,string")
  1090. 12. an info (format: "info:name,arguments", arguments are optional)
  1091. 13. a base 16/32/64 encoded/decoded string (format: "base_encode:base,xxx" or "base_decode:base,xxx")
  1092. 14. current date/time (format: "date" or "date:format")
  1093. 15. an environment variable (format: "env:XXX")
  1094. 16. a ternary operator (format: "if:condition?value_if_true:value_if_false")
  1095. 17. result of an expression with parentheses and operators + - * / // % ** (format: "calc:xxx")
  1096. 18. a random integer number (format: "random:min,max")
  1097. 19. a translated string (format: "translate:xxx")
  1098. 20. an option (format: "file.section.option")
  1099. 21. a local variable in buffer
  1100. 22. a hdata name/variable (the value is automatically converted to string), by default "window" and "buffer" point to current window/buffer.
  1101. Format for hdata can be one of following:
  1102. hdata.var1.var2...: start with a hdata (pointer must be known), and ask variables one after one (other hdata can be followed)
  1103. hdata[list].var1.var2...: start with a hdata using a list/pointer/pointer name, for example:
  1104. ${buffer[gui_buffers].full_name}: full name of first buffer in linked list of buffers
  1105. ${plugin[weechat_plugins].name}: name of first plugin in linked list of plugins
  1106. hdata[pointer].var1.var2...: start with a hdata using a pointer, for example:
  1107. ${buffer[0x1234abcd].full_name}: full name of the buffer with this pointer (can be used in triggers)
  1108. ${buffer[my_pointer].full_name}: full name of the buffer with this pointer name (can be used in triggers)
  1109. For name of hdata and variables, please look at "Plugin API reference", function "weechat_hdata_get".
  1110. Examples (simple strings):
  1111. /eval -n ${raw:${info:version}} ==> ${info:version}
  1112. /eval -n ${eval_cond:${window.win_width}>100} ==> 1
  1113. /eval -n ${info:version} ==> 0.4.3
  1114. /eval -n ${env:HOME} ==> /home/user
  1115. /eval -n ${weechat.look.scroll_amount} ==> 3
  1116. /eval -n ${sec.data.password} ==> secret
  1117. /eval -n ${window} ==> 0x2549aa0
  1118. /eval -n ${window.buffer} ==> 0x2549320
  1119. /eval -n ${window.buffer.full_name} ==> core.weechat
  1120. /eval -n ${window.buffer.number} ==> 1
  1121. /eval -n ${\t} ==> <tab>
  1122. /eval -n ${hide:-,${relay.network.password}} ==> --------
  1123. /eval -n ${cut:3,+,test} ==> tes+
  1124. /eval -n ${cut:+3,+,test} ==> te+
  1125. /eval -n ${date:%H:%M:%S} ==> 07:46:40
  1126. /eval -n ${if:${info:term_width}>80?big:small} ==> big
  1127. /eval -n ${rev:Hello} ==> olleH
  1128. /eval -n ${repeat:5,-} ==> -----
  1129. /eval -n ${length:test} ==> 4
  1130. /eval -n ${calc:(5+2)*3} ==> 21
  1131. /eval -n ${random:0,10} ==> 3
  1132. /eval -n ${base_encode:64,test} ==> dGVzdA==
  1133. /eval -n ${base_decode:64,dGVzdA==} ==> test
  1134. /eval -n ${translate:Plugin} ==> Extension
  1135. Examples (conditions):
  1136. /eval -n -c ${window.buffer.number} > 2 ==> 0
  1137. /eval -n -c ${window.win_width} > 100 ==> 1
  1138. /eval -n -c (8 > 12) || (5 > 2) ==> 1
  1139. /eval -n -c (8 > 12) && (5 > 2) ==> 0
  1140. /eval -n -c abcd =~ ^ABC ==> 1
  1141. /eval -n -c abcd =~ (?-i)^ABC ==> 0
  1142. /eval -n -c abcd =~ (?-i)^abc ==> 1
  1143. /eval -n -c abcd !~ abc ==> 0
  1144. /eval -n -c abcd =* a*d ==> 1
  1145. /eval -n -c abcd =- bc ==> 1
  1146. ----
  1147. [[command_weechat_filter]]
  1148. * `+filter+`: filter messages in buffers, to hide/show them according to tags or regex
  1149. ----
  1150. /filter list
  1151. enable|disable|toggle [<name>|@]
  1152. add|addreplace <name> <buffer>[,<buffer>...] <tags> <regex>
  1153. rename <name> <new_name>
  1154. recreate <name>
  1155. del <name>|-all
  1156. list: list all filters
  1157. enable: enable filters (filters are enabled by default)
  1158. disable: disable filters
  1159. toggle: toggle filters
  1160. name: filter name ("@" = enable/disable all filters in current buffer)
  1161. add: add a filter
  1162. addreplace: add or replace an existing filter
  1163. rename: rename a filter
  1164. recreate: set input with the command used to edit the filter
  1165. del: delete a filter
  1166. -all: delete all filters
  1167. buffer: comma separated list of buffers where filter is active:
  1168. - this is full name including plugin (example: "irc.libera.#weechat" or "irc.server.libera")
  1169. - "*" means all buffers
  1170. - a name starting with '!' is excluded
  1171. - wildcard "*" is allowed
  1172. tags: comma separated list of tags, for example "irc_join,irc_part,irc_quit"
  1173. - logical "and": use "+" between tags (for example: "nick_toto+irc_action")
  1174. - wildcard "*" is allowed
  1175. - if tag starts with '!', then it is excluded and must NOT be in message
  1176. regex: POSIX extended regular expression to search in line
  1177. - use '\t' to separate prefix from message, special chars like '|' must be escaped: '\|'
  1178. - if regex starts with '!', then matching result is reversed (use '\!' to start with '!')
  1179. - two regular expressions are created: one for prefix and one for message
  1180. - regex are case insensitive, they can start by "(?-i)" to become case sensitive
  1181. The default key alt+'=' toggles filtering on/off globally and alt+'-' toggles filtering on/off in the current buffer.
  1182. Tags most commonly used:
  1183. no_filter, no_highlight, no_log, log0..log9 (log level),
  1184. notify_none, notify_message, notify_private, notify_highlight,
  1185. self_msg, nick_xxx (xxx is nick in message), prefix_nick_ccc (ccc is color of nick),
  1186. host_xxx (xxx is username + host in message),
  1187. irc_xxx (xxx is command name or number, see /server raw or /debug tags),
  1188. irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
  1189. To see tags for lines in buffers: /debug tags
  1190. Examples:
  1191. use IRC smart filter on all buffers:
  1192. /filter add irc_smart * irc_smart_filter *
  1193. use IRC smart filter on all buffers except those with "#weechat" in name:
  1194. /filter add irc_smart *,!*#weechat* irc_smart_filter *
  1195. filter all IRC join/part/quit messages:
  1196. /filter add joinquit * irc_join,irc_part,irc_quit *
  1197. filter nicks displayed when joining channels or with /names:
  1198. /filter add nicks * irc_366 *
  1199. filter nick "toto" on IRC channel #weechat:
  1200. /filter add toto irc.libera.#weechat nick_toto *
  1201. filter IRC join/action messages from nick "toto":
  1202. /filter add toto * nick_toto+irc_join,nick_toto+irc_action *
  1203. filter lines containing "weechat sucks" on IRC channel #weechat:
  1204. /filter add sucks irc.libera.#weechat * weechat sucks
  1205. filter lines that are strictly equal to "WeeChat sucks" on all buffers:
  1206. /filter add sucks2 * * (?-i)^WeeChat sucks$
  1207. ----
  1208. [[command_weechat_help]]
  1209. * `+help+`: display help about commands and options
  1210. ----
  1211. /help -list|-listfull [<plugin> [<plugin>...]]
  1212. <command>
  1213. <option>
  1214. -list: list commands, by plugin (without argument, this list is displayed)
  1215. -listfull: list commands with description, by plugin
  1216. plugin: list commands for this plugin
  1217. command: a command name
  1218. option: an option name (use /set to see list)
  1219. ----
  1220. [[command_weechat_history]]
  1221. * `+history+`: show buffer command history
  1222. ----
  1223. /history clear
  1224. <value>
  1225. clear: clear history
  1226. value: number of history entries to show
  1227. ----
  1228. [[command_weechat_input]]
  1229. * `+input+`: functions for command line
  1230. ----
  1231. /input <action> [<arguments>]
  1232. list of actions:
  1233. return: simulate key "enter"
  1234. complete_next: complete word with next completion
  1235. complete_previous: complete word with previous completion
  1236. search_text_here: search text in buffer at current position
  1237. search_text: search text in buffer
  1238. search_switch_case: switch exact case for search
  1239. search_switch_regex: switch search type: string/regular expression
  1240. search_switch_where: switch search in messages/prefixes
  1241. search_previous: search previous line
  1242. search_next: search next line
  1243. search_stop_here: stop search at current position
  1244. search_stop: stop search
  1245. delete_previous_char: delete previous char
  1246. delete_next_char: delete next char
  1247. delete_previous_word: delete previous word
  1248. delete_next_word: delete next word
  1249. delete_beginning_of_line: delete from beginning of line until cursor
  1250. delete_end_of_line: delete from cursor until end of line
  1251. delete_line: delete entire line
  1252. clipboard_paste: paste from the internal clipboard
  1253. transpose_chars: transpose two chars
  1254. undo: undo last command line action
  1255. redo: redo last command line action
  1256. move_beginning_of_line: move cursor to beginning of line
  1257. move_end_of_line: move cursor to end of line
  1258. move_previous_char: move cursor to previous char
  1259. move_next_char: move cursor to next char
  1260. move_previous_word: move cursor to previous word
  1261. move_next_word: move cursor to next word
  1262. history_previous: recall previous command in current buffer history
  1263. history_next: recall next command in current buffer history
  1264. history_global_previous: recall previous command in global history
  1265. history_global_next: recall next command in global history
  1266. jump_smart: jump to next buffer with activity
  1267. jump_last_buffer_displayed: jump to last buffer displayed (before last jump to a buffer)
  1268. jump_previously_visited_buffer: jump to previously visited buffer
  1269. jump_next_visited_buffer: jump to next visited buffer
  1270. hotlist_clear: clear hotlist (optional argument: "lowest" to clear only lowest level in hotlist, "highest" to clear only highest level in hotlist, or level mask: integer which is a combination of 1=join/part, 2=message, 4=private, 8=highlight)
  1271. grab_key: grab a key (optional argument: delay for end of grab, default is 500 milliseconds)
  1272. grab_key_command: grab a key with its associated command (optional argument: delay for end of grab, default is 500 milliseconds)
  1273. grab_mouse: grab mouse event code
  1274. grab_mouse_area: grab mouse event code with area
  1275. set_unread: set unread marker for all buffers
  1276. set_unread_current_buffer: set unread marker for current buffer
  1277. switch_active_buffer: switch to next merged buffer
  1278. switch_active_buffer_previous: switch to previous merged buffer
  1279. zoom_merged_buffer: zoom on merged buffer
  1280. insert: insert text in command line (escaped chars are allowed, see /help print)
  1281. send: send text to the buffer
  1282. paste_start: start paste (bracketed paste mode)
  1283. paste_stop: stop paste (bracketed paste mode)
  1284. This command is used by key bindings or plugins.
  1285. ----
  1286. [[command_weechat_key]]
  1287. * `+key+`: bind/unbind keys
  1288. ----
  1289. /key list|listdefault|listdiff [<context>]
  1290. bind <key> [<command> [<args>]]
  1291. bindctxt <context> <key> [<command> [<args>]]
  1292. unbind <key>
  1293. unbindctxt <context> <key>
  1294. reset <key>
  1295. resetctxt <context> <key>
  1296. resetall -yes [<context>]
  1297. missing [<context>]
  1298. list: list all current keys (without argument, this list is displayed)
  1299. listdefault: list default keys
  1300. listdiff: list differences between current and default keys (keys added, redefined or deleted)
  1301. context: name of context ("default" or "search")
  1302. bind: bind a command to a key or display command bound to key (for context "default")
  1303. bindctxt: bind a command to a key or display command bound to key, for given context
  1304. command: command (many commands can be separated by semicolons)
  1305. unbind: remove a key binding (for context "default")
  1306. unbindctxt: remove a key binding for given context
  1307. reset: reset a key to default binding (for context "default")
  1308. resetctxt: reset a key to default binding, for given context
  1309. resetall: restore bindings to the default values and delete ALL personal bindings (use carefully!)
  1310. missing: add missing keys (using default bindings), useful after installing new WeeChat version
  1311. When binding a command to a key, it is recommended to use key alt+k (or Esc then k), and then press the key to bind: this will insert key code in command line.
  1312. For context "mouse" (possible in context "cursor" too), key has format: "@area:key" or "@area1>area2:key" where area can be:
  1313. *: any area on screen
  1314. chat: chat area (any buffer)
  1315. chat(xxx): chat area for buffer with name "xxx" (full name including plugin)
  1316. bar(*): any bar
  1317. bar(xxx): bar "xxx"
  1318. item(*): any bar item
  1319. item(xxx): bar item "xxx"
  1320. Wildcard "*" is allowed in key to match many mouse events.
  1321. A special value for command with format "hsignal:name" can be used for context mouse, this will send the hsignal "name" with the focus hashtable as argument.
  1322. Another special value "-" can be used to disable key (it will be ignored when looking for keys).
  1323. Examples:
  1324. key alt-t to toggle nicklist bar:
  1325. /key bind meta-t /bar toggle nicklist
  1326. key alt-r to jump to #weechat IRC channel:
  1327. /key bind meta-r /buffer #weechat
  1328. restore default binding for key alt-r:
  1329. /key reset meta-r
  1330. key "tab" to stop search in buffer:
  1331. /key bindctxt search ctrl-I /input search_stop
  1332. middle button of mouse on a nick to retrieve info on nick:
  1333. /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick}
  1334. ----
  1335. [[command_weechat_layout]]
  1336. * `+layout+`: manage buffers/windows layouts
  1337. ----
  1338. /layout store [<name>] [buffers|windows]
  1339. apply [<name>] [buffers|windows]
  1340. leave
  1341. del [<name>] [buffers|windows]
  1342. rename <name> <new_name>
  1343. store: store current buffers/windows in a layout
  1344. apply: apply stored layout
  1345. leave: leave current layout (does not update any layout)
  1346. del: delete buffers and/or windows in a stored layout
  1347. (if neither "buffers" nor "windows" is given after the name, the layout is deleted)
  1348. rename: rename a layout
  1349. name: name for stored layout (default is "default")
  1350. buffers: store/apply only buffers (order of buffers)
  1351. windows: store/apply only windows (buffer displayed by each window)
  1352. Without argument, this command displays stored layouts.
  1353. The current layout can be saved on /quit command with the option "weechat.look.save_layout_on_exit".
  1354. Note: the layout only remembers windows split and buffers numbers. It does not open buffers. That means for example you must still auto-join IRC channels to open the buffers, the saved layout only applies once the buffers are opened.
  1355. ----
  1356. [[command_weechat_mouse]]
  1357. * `+mouse+`: mouse control
  1358. ----
  1359. /mouse enable|disable|toggle [<delay>]
  1360. enable: enable mouse
  1361. disable: disable mouse
  1362. toggle: toggle mouse
  1363. delay: delay (in seconds) after which initial mouse state is restored (useful to temporarily disable mouse)
  1364. The mouse state is saved in option "weechat.look.mouse".
  1365. Examples:
  1366. enable mouse:
  1367. /mouse enable
  1368. toggle mouse for 5 seconds:
  1369. /mouse toggle 5
  1370. ----
  1371. [[command_weechat_mute]]
  1372. * `+mute+`: execute a command silently
  1373. ----
  1374. /mute [-core | -current | -buffer <name>] <command>
  1375. -core: no output on WeeChat core buffer
  1376. -current: no output on current buffer
  1377. -buffer: no output on specified buffer
  1378. name: full buffer name (examples: "irc.server.libera", "irc.libera.#weechat")
  1379. command: command to execute silently (a '/' is automatically added if not found at beginning of command)
  1380. If no target is specified (-core, -current or -buffer), then default is to mute all buffers.
  1381. Examples:
  1382. config save:
  1383. /mute save
  1384. message to current IRC channel:
  1385. /mute -current msg * hi!
  1386. message to #weechat channel:
  1387. /mute -buffer irc.libera.#weechat msg #weechat hi!
  1388. ----
  1389. [[command_weechat_plugin]]
  1390. * `+plugin+`: list/load/unload plugins
  1391. ----
  1392. /plugin list|listfull [<name>]
  1393. load <filename> [<arguments>]
  1394. autoload [<arguments>]
  1395. reload [<name>|* [<arguments>]]
  1396. unload [<name>]
  1397. list: list loaded plugins
  1398. listfull: list loaded plugins (verbose)
  1399. load: load a plugin
  1400. autoload: autoload plugins in system or user directory
  1401. reload: reload a plugin (if no name given, unload all plugins, then autoload plugins)
  1402. unload: unload a plugin (if no name given, unload all plugins)
  1403. filename: plugin (file) to load
  1404. name: a plugin name
  1405. arguments: arguments given to plugin on load
  1406. Without argument, this command lists loaded plugins.
  1407. ----
  1408. [[command_weechat_print]]
  1409. * `+print+`: display text on a buffer
  1410. ----
  1411. /print [-buffer <number>|<name>] [-newbuffer <name>] [-free] [-switch] [-core|-current] [-y <line>] [-escape] [-date <date>] [-tags <tags>] [-action|-error|-join|-network|-quit] [<text>]
  1412. -stdout|-stderr [<text>]
  1413. -beep
  1414. -buffer: display text in this buffer (default: buffer where command is executed)
  1415. -newbuffer: create a new buffer and display text in this buffer
  1416. -free: create a buffer with free content (with -newbuffer only)
  1417. -switch: switch to the buffer
  1418. -core: alias of "-buffer core.weechat"
  1419. -current: display text on current buffer
  1420. -y: display on a custom line (for buffer with free content only)
  1421. 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, etc.)
  1422. -escape: interpret escaped chars (for example \a, \07, \x07)
  1423. -date: message date, format can be:
  1424. -n: 'n' seconds before now
  1425. +n: 'n' seconds in the future
  1426. n: 'n' seconds since the Epoch (see man time)
  1427. date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, example: 2014-01-19T04:32:55
  1428. time: hh:mm:ss (example: 04:32:55)
  1429. -tags: comma-separated list of tags (see /help filter for a list of tags most commonly used)
  1430. text: text to display (prefix and message must be separated by "\t", if text starts with "-", then add a "\" before)
  1431. -stdout: display text on stdout (escaped chars are interpreted)
  1432. -stderr: display text on stderr (escaped chars are interpreted)
  1433. -beep: alias of "-stderr \a"
  1434. The options -action ... -quit use the prefix defined in options "weechat.look.prefix_*".
  1435. Following escaped chars are supported:
  1436. \" \\ \a \b \e \f \n \r \t \v \0ooo \xhh \uhhhh \Uhhhhhhhh
  1437. Examples:
  1438. display a reminder on core buffer with a highlight:
  1439. /print -core -tags notify_highlight Reminder: buy milk
  1440. display an error on core buffer:
  1441. /print -core -error Some error here
  1442. display message on core buffer with prefix "abc":
  1443. /print -core abc\tThe message
  1444. display a message on channel #weechat:
  1445. /print -buffer irc.libera.#weechat Message on #weechat
  1446. display a snowman (U+2603):
  1447. /print -escape \u2603
  1448. send alert (BEL):
  1449. /print -beep
  1450. ----
  1451. [[command_weechat_proxy]]
  1452. * `+proxy+`: manage proxies
  1453. ----
  1454. /proxy list
  1455. add <name> <type> <address> <port> [<username> [<password>]]
  1456. del <name>|-all
  1457. set <name> <option> <value>
  1458. list: list all proxies
  1459. add: add a new proxy
  1460. name: name of proxy (must be unique)
  1461. type: http, socks4 or socks5
  1462. address: IP or hostname
  1463. port: port
  1464. username: username (optional)
  1465. password: password (optional)
  1466. del: delete a proxy (or all proxies with -all)
  1467. set: set a value for a proxy property
  1468. option: option to change (for options list, look at /set weechat.proxy.<proxyname>.*)
  1469. value: new value for option
  1470. Examples:
  1471. add a http proxy, running on local host, port 8888:
  1472. /proxy add local http 127.0.0.1 8888
  1473. add a http proxy using IPv6 protocol:
  1474. /proxy add local http ::1 8888
  1475. /proxy set local ipv6 on
  1476. add a socks5 proxy with username/password:
  1477. /proxy add myproxy socks5 sample.host.org 3128 myuser mypass
  1478. delete a proxy:
  1479. /proxy del myproxy
  1480. ----
  1481. [[command_weechat_quit]]
  1482. * `+quit+`: quit WeeChat
  1483. ----
  1484. /quit [-yes] [<arguments>]
  1485. -yes: required if option "weechat.look.confirm_quit" is enabled
  1486. arguments: text sent with signal "quit"
  1487. (for example irc plugin uses this text to send quit message to server)
  1488. By default when quitting the configuration files are saved (see option "weechat.look.save_config_on_exit") and the current layout can be saved (see option "weechat.look.save_layout_on_exit").
  1489. ----
  1490. [[command_weechat_reload]]
  1491. * `+reload+`: reload configuration files from disk
  1492. ----
  1493. /reload [<file> [<file>...]]
  1494. file: configuration file to reload (without extension ".conf")
  1495. Without argument, all files (WeeChat and plugins) are reloaded.
  1496. ----
  1497. [[command_weechat_repeat]]
  1498. * `+repeat+`: execute a command several times
  1499. ----
  1500. /repeat [-interval <delay>[<unit>]] <count> <command>
  1501. delay: delay between execution of commands
  1502. unit: optional, values are:
  1503. ms: milliseconds
  1504. s: seconds (default)
  1505. m: minutes
  1506. h: hours
  1507. count: number of times to execute command
  1508. command: command to execute (or text to send to buffer if command does not start with '/')
  1509. Note: the command is executed on buffer where /repeat was executed (if the buffer does not exist any more, the command is not executed).
  1510. Example:
  1511. scroll 2 pages up:
  1512. /repeat 2 /window page_up
  1513. ----
  1514. [[command_weechat_save]]
  1515. * `+save+`: save configuration files to disk
  1516. ----
  1517. /save [<file> [<file>...]]
  1518. file: configuration file to save (without extension ".conf")
  1519. Without argument, all files (WeeChat and plugins) are saved.
  1520. By default all configuration files are saved to disk on /quit command (see option "weechat.look.save_config_on_exit").
  1521. ----
  1522. [[command_weechat_secure]]
  1523. * `+secure+`: manage secured data (passwords or private data encrypted in file sec.conf)
  1524. ----
  1525. /secure passphrase <passphrase>|-delete
  1526. decrypt <passphrase>|-discard
  1527. set <name> <value>
  1528. del <name>
  1529. passphrase: change the passphrase (without passphrase, data is stored as plain text in file sec.conf)
  1530. -delete: delete passphrase
  1531. decrypt: decrypt data still encrypted (it happens only if passphrase was not given on startup)
  1532. -discard: discard all data still encrypted
  1533. set: add or change secured data
  1534. del: delete secured data
  1535. Without argument, this command displays secured data in a new buffer.
  1536. Keys on secure buffer:
  1537. alt+v toggle values
  1538. When a passphrase is used (data encrypted), it is asked by WeeChat on startup.
  1539. It is possible to set environment variable "WEECHAT_PASSPHRASE" to prevent the prompt (this same variable is used by WeeChat on /upgrade), or to set option sec.crypt.passphrase_command to read the passphrase from the output of an external command like a password manager (see /help sec.crypt.passphrase_command).
  1540. Secured data with format ${sec.data.xxx} can be used in:
  1541. - command /eval
  1542. - command line argument "--run-command"
  1543. - options weechat.startup.command_{before|after}_plugins
  1544. - other options that may contain a password or sensitive data (for example proxy, irc server and relay); see /help on the options to check if they are evaluated.
  1545. Examples:
  1546. set a passphrase:
  1547. /secure passphrase this is my passphrase
  1548. use program "pass" to read the passphrase on startup:
  1549. /set sec.crypt.passphrase_command "/usr/bin/pass show weechat/passphrase"
  1550. encrypt libera SASL password:
  1551. /secure set libera mypassword
  1552. /set irc.server.libera.sasl_password "${sec.data.libera}"
  1553. encrypt oftc password for nickserv:
  1554. /secure set oftc mypassword
  1555. /set irc.server.oftc.command "/msg nickserv identify ${sec.data.oftc}"
  1556. alias to ghost the nick "mynick":
  1557. /alias add ghost /eval /msg -server libera nickserv ghost mynick ${sec.data.libera}
  1558. ----
  1559. [[command_weechat_set]]
  1560. * `+set+`: set config options and environment variables
  1561. ----
  1562. /set [<option> [<value>]]
  1563. diff [<option> [<option>...]]
  1564. env [<variable> [<value>]]
  1565. option: name of an option (wildcard "*" is allowed to list options, if no value is specified)
  1566. value: new value for option, according to type:
  1567. boolean: on, off or toggle
  1568. integer: number, ++number or --number
  1569. string: any string ("" for empty string)
  1570. color: color name, ++number or --number
  1571. Note: for all types, you can use null to remove option value (undefined value). This works only for some special plugin variables.
  1572. diff: display only changed options
  1573. env: display or set an environment variable (use value "" to unset a variable)
  1574. Examples:
  1575. display options about highlight:
  1576. /set *highlight*
  1577. add a word to highlight:
  1578. /set weechat.look.highlight "word"
  1579. display changed options:
  1580. /set diff
  1581. display changed options in irc plugin:
  1582. /set diff irc.*
  1583. display value of environment variable LANG:
  1584. /set env LANG
  1585. set environment variable LANG and use it:
  1586. /set env LANG fr_FR.UTF-8
  1587. /upgrade
  1588. unset environment variable ABC:
  1589. /set env ABC ""
  1590. ----
  1591. [[command_weechat_unset]]
  1592. * `+unset+`: unset/reset config options
  1593. ----
  1594. /unset <option>
  1595. -mask <option>
  1596. option: name of an option
  1597. -mask: use a mask in option (wildcard "*" is allowed to mass-reset options, use carefully!)
  1598. According to option, it's reset (for standard options) or removed (for optional settings, like server values).
  1599. Examples:
  1600. reset one option:
  1601. /unset weechat.look.item_time_format
  1602. reset all color options:
  1603. /unset -mask weechat.color.*
  1604. ----
  1605. [[command_weechat_upgrade]]
  1606. * `+upgrade+`: reload the WeeChat binary without disconnecting from servers
  1607. ----
  1608. /upgrade [-yes] [<path_to_binary>|-quit]
  1609. -yes: required if option "weechat.look.confirm_upgrade" is enabled
  1610. path_to_binary: path to WeeChat binary (default is current binary)
  1611. -dummy: do nothing (option used to prevent accidental completion with "-quit")
  1612. -quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
  1613. This command upgrades and reloads a running WeeChat session. The new WeeChat binary must have been compiled or installed with a package manager before running this command.
  1614. Note: SSL connections are lost during upgrade, because reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
  1615. Upgrade process has 4 steps:
  1616. 1. save session into files for core and plugins (buffers, history, ..)
  1617. 2. unload all plugins (configuration files (*.conf) are written on disk)
  1618. 3. save WeeChat configuration (weechat.conf)
  1619. 4. execute new WeeChat binary and reload session.
  1620. With option "-quit", the process is slightly different:
  1621. 1. close *ALL* connections (irc, xfer, relay, ...)
  1622. 2. save session into files (*.upgrade)
  1623. 3. unload all plugins
  1624. 4. save WeeChat configuration
  1625. 5. quit WeeChat
  1626. Then later you can restore session with command: weechat --upgrade
  1627. IMPORTANT: you must restore the session with exactly same configuration (files *.conf).
  1628. It is possible to restore WeeChat session on another machine if you copy the content of WeeChat home directories (see /debug dirs).
  1629. ----
  1630. [[command_weechat_uptime]]
  1631. * `+uptime+`: show WeeChat uptime
  1632. ----
  1633. /uptime [-o|-ol]
  1634. -o: send uptime to current buffer as input (English string)
  1635. -ol: send uptime to current buffer as input (translated string)
  1636. ----
  1637. [[command_weechat_version]]
  1638. * `+version+`: show WeeChat version and compilation date
  1639. ----
  1640. /version [-o|-ol]
  1641. -o: send version to current buffer as input (English string)
  1642. -ol: send version to current buffer as input (translated string)
  1643. The default alias /v can be used to execute this command on all buffers (otherwise the irc command /version is used on irc buffers).
  1644. ----
  1645. [[command_weechat_wait]]
  1646. * `+wait+`: schedule a command execution in future
  1647. ----
  1648. /wait <number>[<unit>] <command>
  1649. number: amount of time to wait (integer number)
  1650. unit: optional, values are:
  1651. ms: milliseconds
  1652. s: seconds (default)
  1653. m: minutes
  1654. h: hours
  1655. command: command to execute (or text to send to buffer if command does not start with '/')
  1656. Note: the command is executed on buffer where /wait was executed (if the buffer does not exist any more, the command is not executed).
  1657. Examples:
  1658. join channel in 10 seconds:
  1659. /wait 10 /join #test
  1660. set away in 15 minutes:
  1661. /wait 15m /away -all I'm away
  1662. say 'hello' in 2 minutes:
  1663. /wait 2m hello
  1664. ----
  1665. [[command_weechat_window]]
  1666. * `+window+`: manage windows
  1667. ----
  1668. /window list
  1669. -1|+1|b#|up|down|left|right [-window <number>]
  1670. <number>
  1671. splith|splitv [-window <number>] [<pct>]
  1672. resize [-window <number>] [h|v][+|-]<pct>
  1673. balance
  1674. merge [-window <number>] [all]
  1675. close [-window <number>]
  1676. page_up|page_down [-window <number>]
  1677. refresh
  1678. scroll [-window <number>] [+|-]<value>[s|m|h|d|M|y]
  1679. scroll_horiz [-window <number>] [+|-]<value>[%]
  1680. scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_beyond_end|scroll_previous_highlight|scroll_next_highlight|scroll_unread [-window <number>]
  1681. swap [-window <number>] [up|down|left|right]
  1682. zoom [-window <number>]
  1683. bare [<delay>]
  1684. list: list opened windows (without argument, this list is displayed)
  1685. -1: jump to previous window
  1686. +1: jump to next window
  1687. b#: jump to next window displaying buffer number #
  1688. up: switch to window above current one
  1689. down: switch to window below current one
  1690. left: switch to window on the left
  1691. right: switch to window on the right
  1692. number: window number (see /window list)
  1693. splith: split current window horizontally (to undo: /window merge)
  1694. splitv: split current window vertically (to undo: /window merge)
  1695. resize: resize window size, new size is <pct> percentage of parent window
  1696. if "h" or "v" is specified, the resize affects the nearest parent window with a split of this type (horizontal/vertical)
  1697. balance: balance the sizes of all windows
  1698. merge: merge window with another (all = keep only one window)
  1699. close: close window
  1700. page_up: scroll one page up
  1701. page_down: scroll one page down
  1702. refresh: refresh screen
  1703. scroll: scroll a number of lines (+/-N) or with time: s=seconds, m=minutes, h=hours, d=days, M=months, y=years
  1704. scroll_horiz: scroll horizontally a number of columns (+/-N) or percentage of window size (this scrolling is possible only on buffers with free content)
  1705. scroll_up: scroll a few lines up
  1706. scroll_down: scroll a few lines down
  1707. scroll_top: scroll to top of buffer
  1708. scroll_bottom: scroll to bottom of buffer
  1709. scroll_beyond_end: scroll beyond the end of buffer
  1710. scroll_previous_highlight: scroll to previous highlight
  1711. scroll_next_highlight: scroll to next highlight
  1712. scroll_unread: scroll to unread marker
  1713. swap: swap buffers of two windows (with optional direction for target window)
  1714. zoom: zoom on window
  1715. bare: toggle bare display (with optional delay in seconds for automatic return to standard display mode)
  1716. For splith and splitv, pct is a percentage which represents size of new window, computed with current window as size reference. For example 25 means create a new window with size = current_size / 4
  1717. Examples:
  1718. jump to window displaying buffer #1:
  1719. /window b1
  1720. scroll 2 lines up:
  1721. /window scroll -2
  1722. scroll 2 days up:
  1723. /window scroll -2d
  1724. scroll to beginning of current day:
  1725. /window scroll -d
  1726. zoom on window #2:
  1727. /window zoom -window 2
  1728. split window horizontally using 30% of space for the window on top:
  1729. /window splith 30
  1730. resize window to 75% of the parent window size:
  1731. /window resize 75
  1732. resize vertical split, add 10% in size:
  1733. /window resize v+10
  1734. remove the split, keep the current window:
  1735. /window merge
  1736. close the current window:
  1737. /window close
  1738. enable bare display for 2 seconds:
  1739. /window bare 2
  1740. ----
  1741. // end::weechat_commands[]
  1742. // tag::buflist_commands[]
  1743. [[command_buflist_buflist]]
  1744. * `+buflist+`: bar item with list of buffers
  1745. ----
  1746. /buflist enable|disable|toggle
  1747. bar
  1748. refresh
  1749. enable: enable buflist
  1750. disable: disable buflist
  1751. toggle: toggle buflist
  1752. bar: add the "buflist" bar
  1753. refresh: force the refresh of the bar items (buflist, buflist2 and buflist3)
  1754. The lines with buffers are displayed using string evaluation (see /help eval for the format), with these options:
  1755. - buflist.look.display_conditions: conditions to display a buffer in the list
  1756. - buflist.format.buffer: format for a buffer which is not current buffer
  1757. - buflist.format.buffer_current: format for the current buffer
  1758. The following variables can be used in these options:
  1759. - bar item data (see hdata "bar_item" in API doc for a complete list), for example:
  1760. - ${bar_item.name}
  1761. - window data, where the bar item is displayed (there's no window in root bars, see hdata "window" in API doc for a complete list), for example:
  1762. - ${window.number}
  1763. - ${window.buffer.full_name}
  1764. - buffer data (see hdata "buffer" in API doc for a complete list), for example:
  1765. - ${buffer.number}
  1766. - ${buffer.name}
  1767. - ${buffer.full_name}
  1768. - ${buffer.short_name}
  1769. - ${buffer.nicklist_nicks_count}
  1770. - irc_server: IRC server data, defined only on an IRC buffer (see hdata "irc_server" in API doc)
  1771. - irc_channel: IRC channel data, defined only on an IRC channel buffer (see hdata "irc_channel" in API doc)
  1772. - extra variables added by buflist for convenience:
  1773. - ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example
  1774. - ${current_buffer}: a boolean ("0" or "1"), "1" if this is the current buffer; it can be used in a condition: ${if:${current_buffer}?...:...}
  1775. - ${merged}: a boolean ("0" or "1"), "1" if the buffer is merged with at least another buffer; it can be used in a condition: ${if:${merged}?...:...}
  1776. - ${format_number}: indented number with separator (evaluation of option buflist.format.number)
  1777. - ${number}: indented number, for example " 1" if there are between 10 and 99 buffers; for merged buffers, this variable is set with number for the first buffer and spaces for the next buffers with same number
  1778. - ${number2}: indented number, for example " 1" if there are between 10 and 99 buffers
  1779. - ${number_displayed}: "1" if the number is displayed, otherwise "0"
  1780. - ${indent}: indentation for name (channel and private buffers are indented) (evaluation of option buflist.format.indent)
  1781. - ${format_nick_prefix}: colored nick prefix for a channel (evaluation of option buflist.format.nick_prefix)
  1782. - ${color_nick_prefix}: color of nick prefix for a channel (set only if the option buflist.look.nick_prefix is enabled)
  1783. - ${nick_prefix}: nick prefix for a channel (set only if the option buflist.look.nick_prefix is enabled)
  1784. - ${format_name}: formatted name (evaluation of option buflist.format.name)
  1785. - ${name}: the short name (if set), with a fallback on the name
  1786. - ${color_hotlist}: the color depending on the highest hotlist level for the buffer (evaluation of option buflist.format.hotlist_xxx where xxx is the level)
  1787. - ${format_hotlist}: the formatted hotlist (evaluation of option buflist.format.hotlist)
  1788. - ${hotlist}: the raw hotlist
  1789. - ${hotlist_priority}: "none", "low", "message", "private" or "highlight"
  1790. - ${format_lag}: the lag for an IRC server buffer, empty if there's no lag (evaluation of option buflist.format.lag)
  1791. - ${format_tls_version}: indicator of TLS version for a server buffer, empty for channels (evaluation of option buflist.format.tls_version)
  1792. ----
  1793. // end::buflist_commands[]
  1794. // tag::charset_commands[]
  1795. [[command_charset_charset]]
  1796. * `+charset+`: change charset for current buffer
  1797. ----
  1798. /charset decode|encode <charset>
  1799. reset
  1800. decode: change decoding charset
  1801. encode: change encoding charset
  1802. charset: new charset for current buffer
  1803. reset: reset charsets for current buffer
  1804. ----
  1805. // end::charset_commands[]
  1806. // tag::exec_commands[]
  1807. [[command_exec_exec]]
  1808. * `+exec+`: execute external commands
  1809. ----
  1810. /exec -list
  1811. [-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>
  1812. -in <id> <text>
  1813. -inclose <id> [<text>]
  1814. -signal <id> <signal>
  1815. -kill <id>
  1816. -killall
  1817. -set <id> <property> <value>
  1818. -del <id>|-all [<id>...]
  1819. -list: list commands
  1820. -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)
  1821. -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)
  1822. -bg: run process in background: do not display process output neither return code (not compatible with options -o/-oc/-n/-nf/-pipe/-hsignal)
  1823. -nobg: catch process output and display return code (default)
  1824. -stdin: create a pipe for sending data to the process (with /exec -in/-inclose)
  1825. -nostdin: do not create a pipe for stdin (default)
  1826. -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)
  1827. -l: display locally output of command on buffer (default)
  1828. -o: send output of command to the buffer without executing commands (not compatible with options -bg/-pipe/-hsignal)
  1829. -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)
  1830. -n: display output of command in a new buffer (not compatible with options -bg/-pipe/-hsignal)
  1831. -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)
  1832. -oerr: also send stderr (error output) to the buffer (can be used only with options -o and -oc)
  1833. -cl: clear the new buffer before displaying output
  1834. -nocl: append to the new buffer without clear (default)
  1835. -sw: switch to the output buffer (default)
  1836. -nosw: don't switch to the output buffer
  1837. -ln: display line numbers (default in new buffer only)
  1838. -noln: don't display line numbers
  1839. -flush: display output of command in real time (default)
  1840. -noflush: display output of command after its end
  1841. -color: action on ANSI colors in output:
  1842. ansi: keep ANSI codes as-is
  1843. auto: convert ANSI colors to WeeChat/IRC (default)
  1844. irc: convert ANSI colors to IRC colors
  1845. weechat: convert ANSI colors to WeeChat colors
  1846. strip: remove ANSI colors
  1847. -rc: display return code (default)
  1848. -norc: don't display return code
  1849. -timeout: set a timeout for the command (in seconds)
  1850. -name: set a name for the command (to name it later with /exec)
  1851. -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)
  1852. -hsignal: send the output as a hsignal (to be used for example in a trigger) (not compatible with options -bg/-o/-oc/-n/-nf)
  1853. command: the command to execute; if beginning with "url:", the shell is disabled and the content of URL is downloaded and sent as output
  1854. id: command identifier: either its number or name (if set with "-name xxx")
  1855. -in: send text on standard input of process
  1856. -inclose: same as -in, but stdin is closed after (and text is optional: without text, the stdin is just closed)
  1857. -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
  1858. -kill: alias of "-signal <id> kill"
  1859. -killall: kill all running processes
  1860. -set: set a hook property (see function hook_set in plugin API reference)
  1861. property: hook property
  1862. value: new value for hook property
  1863. -del: delete a terminated command
  1864. -all: delete all terminated commands
  1865. Default options can be set in the option exec.command.default_options.
  1866. Examples:
  1867. /exec -n ls -l /tmp
  1868. /exec -sh -n ps xu | grep weechat
  1869. /exec -n -norc url:https://pastebin.com/raw.php?i=xxxxxxxx
  1870. /exec -nf -noln links -dump https://weechat.org/files/doc/devel/weechat_user.en.html
  1871. /exec -o uptime
  1872. /exec -pipe "/print Machine uptime:" uptime
  1873. /exec -n tail -f /var/log/messages
  1874. /exec -kill 0
  1875. ----
  1876. // end::exec_commands[]
  1877. // tag::fifo_commands[]
  1878. [[command_fifo_fifo]]
  1879. * `+fifo+`: fifo plugin configuration
  1880. ----
  1881. /fifo enable|disable|toggle
  1882. enable: enable FIFO pipe
  1883. disable: disable FIFO pipe
  1884. toggle: toggle FIFO pipe
  1885. FIFO pipe is used as remote control of WeeChat: you can send commands or text to the FIFO pipe from your shell.
  1886. By default the FIFO pipe is called weechat_fifo_xxx (where xxx is the WeeChat process id) and located in the WeeChat runtime directory (see /debug dirs).
  1887. The expected format is one of:
  1888. plugin.buffer *text or command here
  1889. *text or command here
  1890. For example to change your libera nick:
  1891. echo 'irc.server.libera */nick newnick' >/run/user/1000/weechat/weechat_fifo_12345
  1892. Please read the user's guide for more info and examples.
  1893. Examples:
  1894. /fifo toggle
  1895. ----
  1896. // end::fifo_commands[]
  1897. // tag::fset_commands[]
  1898. [[command_fset_fset]]
  1899. * `+fset+`: fast set WeeChat and plugins options
  1900. ----
  1901. /fset -bar
  1902. -refresh
  1903. -up|-down [<number>]
  1904. -left|-right [<percent>]
  1905. -go <line>|end
  1906. -toggle
  1907. -add [<value>]
  1908. -reset
  1909. -unset
  1910. -set
  1911. -setnew
  1912. -append
  1913. -mark
  1914. -format
  1915. -export [-help|-nohelp] <filename>
  1916. <filter>
  1917. -bar: add the help bar
  1918. -refresh: refresh list of options, then whole screen (command: /window refresh)
  1919. -up: move the selected line up by "number" lines
  1920. -down: move the selected line down by "number" lines
  1921. -left: scroll the fset buffer by "percent" of width on the left
  1922. -right: scroll the fset buffer by "percent" of width on the right
  1923. -go: select a line by number, first line number is 0 ("end" to select the last line)
  1924. -toggle: toggle the boolean value
  1925. -add: add "value" (which can be a negative number) for integers and colors, set/append to value for other types (set for a negative value, append for a positive value)
  1926. -reset: reset the value of option
  1927. -unset: unset the option
  1928. -set: add the /set command in input to edit the value of option (move the cursor at the beginning of value)
  1929. -setnew: add the /set command in input to edit a new value for the option
  1930. -append: add the /set command to append something in the value of option (move the cursor at the end of value)
  1931. -mark: toggle mark
  1932. -format: switch to the next available format
  1933. -export: export the options and values displayed in a file (each line has format: "/set name value" or "/unset name")
  1934. -help: force writing of help on options in exported file (see /help fset.look.export_help_default)
  1935. -nohelp: do not write help on options in exported file (see /help fset.look.export_help_default)
  1936. filter: set a new filter to see only matching options (this filter can be used as input in fset buffer as well); allowed formats are:
  1937. * show all options (no filter)
  1938. xxx show only options with "xxx" in name
  1939. f:xxx show only configuration file "xxx"
  1940. t:xxx show only type "xxx" (bool/int/str/col)
  1941. d show only changed options
  1942. d:xxx show only changed options with "xxx" in name
  1943. d=xxx show only changed options with "xxx" in value
  1944. d==xxx show only changed options with exact value "xxx"
  1945. h=xxx show only options with "xxx" in description (translated)
  1946. he=xxx show only options with "xxx" in description (in English)
  1947. =xxx show only options with "xxx" in value
  1948. ==xxx show only options with exact value "xxx"
  1949. c:xxx show only options matching the evaluated condition "xxx", using following variables: file, section, option, name, parent_name, type, type_en, type_short (bool/int/str/col), type_tiny (b/i/s/c), default_value, default_value_undef, value, quoted_value, value_undef, value_changed, parent_value, min, max, description, description2, description_en, description_en2, string_values
  1950. The lines with options are displayed using string evaluation (see /help eval for the format), with these options:
  1951. - fset.format.option1: first format for an option
  1952. - fset.format.option2: second format for an option
  1953. The following variables can be used in these options:
  1954. - option data, with color and padded by spaces on the right:
  1955. - ${file}: configuration file (for example "weechat" or "irc")
  1956. - ${section}: section
  1957. - ${option}: option name
  1958. - ${name}: full option name (file.section.option)
  1959. - ${parent_name}: parent option name
  1960. - ${type}: option type (translated)
  1961. - ${type_en}: option type (in English)
  1962. - ${type_short}: short option type (bool/int/str/col)
  1963. - ${type_tiny}: tiny option type (b/i/s/c)
  1964. - ${default_value}: option default value
  1965. - ${default_value_undef}: "1" if default value is null, otherwise "0"
  1966. - ${value}: option value
  1967. - ${value_undef}: "1" if value is null, otherwise "0"
  1968. - ${value_changed}: "1" if value is different from default value, otherwise "0"
  1969. - ${value2}: option value, with inherited value if null
  1970. - ${parent_value}: parent option value
  1971. - ${min}: min value
  1972. - ${max}: max value
  1973. - ${description}: option description (translated)
  1974. - ${description2}: option description (translated), "(no description)" (translated) if there's no description
  1975. - ${description_en}: option description (in English)
  1976. - ${description_en2}: option description (in English), "(no description)" if there's no description
  1977. - ${string_values}: string values allowed for set of an integer option using strings
  1978. - ${marked}: "1" if option is marked, otherwise "0"
  1979. - ${index}: index of option in list
  1980. - option data, with color but no spaces:
  1981. - same names prefixed by underscore, for example: ${_name}, ${_type}, ...
  1982. - option data, raw format (no colors/spaces):
  1983. - same names prefixed by two underscores, for example: ${__name}, ${__type}, ...
  1984. - option data, only spaces:
  1985. - same names prefixed with "empty_", for example: ${empty_name}, ${empty_type}
  1986. - other data:
  1987. - ${selected_line}: "1" if the line is selected, otherwise "0"
  1988. - ${newline}: insert a new line at point, so the option is displayed on multiple lines
  1989. Keys and input to move in on fset buffer:
  1990. up move one line up
  1991. down move one line down
  1992. pgup move one page up
  1993. pgdn move one page down
  1994. alt-home << move to first line
  1995. alt-end >> move to last line
  1996. F11 < scroll horizontally on the left
  1997. F12 > scroll horizontally on the right
  1998. Keys and input to set options on fset buffer:
  1999. alt+space t toggle boolean value
  2000. alt+'-' - subtract 1 from value for integer/color, set value for other types
  2001. alt+'+' + add 1 to value for integer/color, append to value for other types
  2002. alt+f, alt+r r reset value
  2003. alt+f, alt+u u unset value
  2004. alt+enter s set value
  2005. alt+f, alt+n n set new value
  2006. alt+f, alt+a a append to value
  2007. alt+',' , mark/unmark option
  2008. shift+up move one line up and mark/unmark option
  2009. shift+down mark/unmark option and move one line down
  2010. m:xxx mark options displayed that are matching filter "xxx" (any filter on option or value is allowed, see filters above)
  2011. u:xxx unmark options displayed that are matching filter "xxx" (any filter on option or value is allowed, see filters above)
  2012. Other keys and input on fset buffer:
  2013. ctrl+L refresh options and whole screen (command: /fset -refresh)
  2014. $ refresh options (keep marked options)
  2015. $$ refresh options (unmark all options)
  2016. alt+p p toggle plugin description options (plugins.desc.*)
  2017. alt+v v toggle help bar
  2018. s:x,y sort options by fields x,y (see /help fset.look.sort)
  2019. s: reset sort to its default value (see /help fset.look.sort)
  2020. w:xxx export options in file "xxx"
  2021. w-:xxx export options in file "xxx" without help
  2022. w+:xxx export options in file "xxx" with help
  2023. ctrl+X x switch the format used to display options
  2024. q close fset buffer
  2025. Mouse actions on fset buffer:
  2026. wheel up/down move line up/down
  2027. left button move line here
  2028. right button toggle boolean (on/off) or edit the option value
  2029. right button + drag left/right increase/decrease value for integer/color, set/append to value for other types
  2030. right button + drag up/down mark/unmark multiple options
  2031. Note: if input has one or more leading spaces, the following text is interpreted as a filter, without the spaces. For example " q" searches all options with "q" inside name while "q" closes the fset buffer.
  2032. Examples:
  2033. show IRC options changed:
  2034. /fset d:irc.*
  2035. show all options with "nicklist" in name:
  2036. /fset nicklist
  2037. show all values which contain "red":
  2038. /fset =red
  2039. show all values which are exactly "red":
  2040. /fset ==red
  2041. show all integer options in irc plugin:
  2042. /fset c:${file} == irc && ${type_en} == integer
  2043. ----
  2044. // end::fset_commands[]
  2045. // tag::guile_commands[]
  2046. [[command_guile_guile]]
  2047. * `+guile+`: list/load/unload scripts
  2048. ----
  2049. /guile list|listfull [<name>]
  2050. load [-q] <filename>
  2051. autoload
  2052. reload|unload [-q] [<name>]
  2053. eval [-o|-oc] <code>
  2054. version
  2055. list: list loaded scripts
  2056. listfull: list loaded scripts (verbose)
  2057. load: load a script
  2058. autoload: load all scripts in "autoload" directory
  2059. reload: reload a script (if no name given, unload all scripts, then load all scripts in "autoload" directory)
  2060. unload: unload a script (if no name given, unload all scripts)
  2061. filename: script (file) to load
  2062. -q: quiet mode: do not display messages
  2063. name: a script name (name used in call to "register" function)
  2064. eval: evaluate source code and display result on current buffer
  2065. -o: send evaluation result to the buffer without executing commands
  2066. -oc: send evaluation result to the buffer and execute commands
  2067. code: source code to evaluate
  2068. version: display the version of interpreter used
  2069. Without argument, this command lists all loaded scripts.
  2070. ----
  2071. // end::guile_commands[]
  2072. // tag::javascript_commands[]
  2073. [[command_javascript_javascript]]
  2074. * `+javascript+`: list/load/unload scripts
  2075. ----
  2076. /javascript list|listfull [<name>]
  2077. load [-q] <filename>
  2078. autoload
  2079. reload|unload [-q] [<name>]
  2080. eval [-o|-oc] <code>
  2081. version
  2082. list: list loaded scripts
  2083. listfull: list loaded scripts (verbose)
  2084. load: load a script
  2085. autoload: load all scripts in "autoload" directory
  2086. reload: reload a script (if no name given, unload all scripts, then load all scripts in "autoload" directory)
  2087. unload: unload a script (if no name given, unload all scripts)
  2088. filename: script (file) to load
  2089. -q: quiet mode: do not display messages
  2090. name: a script name (name used in call to "register" function)
  2091. eval: evaluate source code and display result on current buffer
  2092. -o: send evaluation result to the buffer without executing commands
  2093. -oc: send evaluation result to the buffer and execute commands
  2094. code: source code to evaluate
  2095. version: display the version of interpreter used
  2096. Without argument, this command lists all loaded scripts.
  2097. ----
  2098. // end::javascript_commands[]
  2099. // tag::logger_commands[]
  2100. [[command_logger_logger]]
  2101. * `+logger+`: logger plugin configuration
  2102. ----
  2103. /logger list
  2104. set <level>
  2105. flush
  2106. disable
  2107. list: show logging status for opened buffers
  2108. set: set logging level on current buffer
  2109. level: level for messages to be logged (0 = logging disabled, 1 = a few messages (most important) .. 9 = all messages)
  2110. flush: write all log files now
  2111. disable: disable logging on current buffer (set level to 0)
  2112. Options "logger.level.*" and "logger.mask.*" can be used to set level or mask for a buffer, or buffers beginning with name.
  2113. Log levels used by IRC plugin:
  2114. 1: user message (channel and private), notice (server and channel)
  2115. 2: nick change
  2116. 3: server message
  2117. 4: join/part/quit
  2118. 9: all other messages
  2119. Examples:
  2120. set level to 5 for current buffer:
  2121. /logger set 5
  2122. disable logging for current buffer:
  2123. /logger disable
  2124. set level to 3 for all IRC buffers:
  2125. /set logger.level.irc 3
  2126. disable logging for main WeeChat buffer:
  2127. /set logger.level.core.weechat 0
  2128. use a directory per IRC server and a file per channel inside:
  2129. /set logger.mask.irc "$server/$channel.weechatlog"
  2130. ----
  2131. // end::logger_commands[]
  2132. // tag::lua_commands[]
  2133. [[command_lua_lua]]
  2134. * `+lua+`: list/load/unload scripts
  2135. ----
  2136. /lua list|listfull [<name>]
  2137. load [-q] <filename>
  2138. autoload
  2139. reload|unload [-q] [<name>]
  2140. eval [-o|-oc] <code>
  2141. version
  2142. list: list loaded scripts
  2143. listfull: list loaded scripts (verbose)
  2144. load: load a script
  2145. autoload: load all scripts in "autoload" directory
  2146. reload: reload a script (if no name given, unload all scripts, then load all scripts in "autoload" directory)
  2147. unload: unload a script (if no name given, unload all scripts)
  2148. filename: script (file) to load
  2149. -q: quiet mode: do not display messages
  2150. name: a script name (name used in call to "register" function)
  2151. eval: evaluate source code and display result on current buffer
  2152. -o: send evaluation result to the buffer without executing commands
  2153. -oc: send evaluation result to the buffer and execute commands
  2154. code: source code to evaluate
  2155. version: display the version of interpreter used
  2156. Without argument, this command lists all loaded scripts.
  2157. ----
  2158. // end::lua_commands[]
  2159. // tag::xfer_commands[]
  2160. [[command_xfer_me]]
  2161. * `+me+`: send a CTCP action to remote host
  2162. ----
  2163. /me <message>
  2164. message: message to send
  2165. ----
  2166. [[command_xfer_xfer]]
  2167. * `+xfer+`: xfer control
  2168. ----
  2169. /xfer [list|listfull]
  2170. list: list xfer
  2171. listfull: list xfer (verbose)
  2172. Without argument, this command opens buffer with xfer list.
  2173. ----
  2174. // end::xfer_commands[]
  2175. // tag::perl_commands[]
  2176. [[command_perl_perl]]
  2177. * `+perl+`: list/load/unload scripts
  2178. ----
  2179. /perl list|listfull [<name>]
  2180. load [-q] <filename>
  2181. autoload
  2182. reload|unload [-q] [<name>]
  2183. eval [-o|-oc] <code>
  2184. version
  2185. list: list loaded scripts
  2186. listfull: list loaded scripts (verbose)
  2187. load: load a script
  2188. autoload: load all scripts in "autoload" directory
  2189. reload: reload a script (if no name given, unload all scripts, then load all scripts in "autoload" directory)
  2190. unload: unload a script (if no name given, unload all scripts)
  2191. filename: script (file) to load
  2192. -q: quiet mode: do not display messages
  2193. name: a script name (name used in call to "register" function)
  2194. eval: evaluate source code and display result on current buffer
  2195. -o: send evaluation result to the buffer without executing commands
  2196. -oc: send evaluation result to the buffer and execute commands
  2197. code: source code to evaluate
  2198. version: display the version of interpreter used
  2199. Without argument, this command lists all loaded scripts.
  2200. ----
  2201. // end::perl_commands[]
  2202. // tag::php_commands[]
  2203. [[command_php_php]]
  2204. * `+php+`: list/load/unload scripts
  2205. ----
  2206. /php list|listfull [<name>]
  2207. load [-q] <filename>
  2208. autoload
  2209. reload|unload [-q] [<name>]
  2210. eval [-o|-oc] <code>
  2211. version
  2212. list: list loaded scripts
  2213. listfull: list loaded scripts (verbose)
  2214. load: load a script
  2215. autoload: load all scripts in "autoload" directory
  2216. reload: reload a script (if no name given, unload all scripts, then load all scripts in "autoload" directory)
  2217. unload: unload a script (if no name given, unload all scripts)
  2218. filename: script (file) to load
  2219. -q: quiet mode: do not display messages
  2220. name: a script name (name used in call to "register" function)
  2221. eval: evaluate source code and display result on current buffer
  2222. -o: send evaluation result to the buffer without executing commands
  2223. -oc: send evaluation result to the buffer and execute commands
  2224. code: source code to evaluate
  2225. version: display the version of interpreter used
  2226. Without argument, this command lists all loaded scripts.
  2227. ----
  2228. // end::php_commands[]
  2229. // tag::python_commands[]
  2230. [[command_python_python]]
  2231. * `+python+`: list/load/unload scripts
  2232. ----
  2233. /python list|listfull [<name>]
  2234. load [-q] <filename>
  2235. autoload
  2236. reload|unload [-q] [<name>]
  2237. eval [-o|-oc] <code>
  2238. version
  2239. list: list loaded scripts
  2240. listfull: list loaded scripts (verbose)
  2241. load: load a script
  2242. autoload: load all scripts in "autoload" directory
  2243. reload: reload a script (if no name given, unload all scripts, then load all scripts in "autoload" directory)
  2244. unload: unload a script (if no name given, unload all scripts)
  2245. filename: script (file) to load
  2246. -q: quiet mode: do not display messages
  2247. name: a script name (name used in call to "register" function)
  2248. eval: evaluate source code and display result on current buffer
  2249. -o: send evaluation result to the buffer without executing commands
  2250. -oc: send evaluation result to the buffer and execute commands
  2251. code: source code to evaluate
  2252. version: display the version of interpreter used
  2253. Without argument, this command lists all loaded scripts.
  2254. ----
  2255. // end::python_commands[]
  2256. // tag::relay_commands[]
  2257. [[command_relay_relay]]
  2258. * `+relay+`: relay control
  2259. ----
  2260. /relay list|listfull|listrelay
  2261. add <name> <port>|<path>
  2262. del|start|restart|stop <name>
  2263. raw
  2264. sslcertkey
  2265. list: list relay clients (only active relays)
  2266. listfull: list relay clients (verbose, all relays)
  2267. listrelay: list relays (name and port)
  2268. add: add a relay (listen on a port/path)
  2269. del: remove a relay (clients remain connected)
  2270. start: listen on port
  2271. restart: close the server socket and listen again on port (clients remain connected)
  2272. stop: close the server socket (clients remain connected)
  2273. name: relay name (see format below)
  2274. port: port used for relay
  2275. path: path used for relay (for UNIX domain socket only); path is evaluated (see function string_eval_path_home in plugin API reference)
  2276. raw: open buffer with raw Relay data
  2277. sslcertkey: set SSL certificate/key using path in option relay.network.ssl_cert_key
  2278. Relay name is: [ipv4.][ipv6.][ssl.]<protocol.name> or unix.[ssl.]<protocol.name>
  2279. ipv4: force use of IPv4
  2280. ipv6: force use of IPv6
  2281. ssl: enable SSL
  2282. unix: use UNIX domain socket
  2283. protocol.name: protocol and name to relay:
  2284. - protocol "irc": name is the server to share (optional, if not given, the server name must be sent by client in command "PASS", with format: "PASS server:password")
  2285. - protocol "weechat" (name is not used)
  2286. The "irc" protocol allows any IRC client (including WeeChat itself) to connect on the port.
  2287. The "weechat" protocol allows a remote interface to connect on the port, see the list here: https://weechat.org/about/interfaces
  2288. Without argument, this command opens buffer with list of relay clients.
  2289. Examples:
  2290. irc proxy, for server "libera":
  2291. /relay add irc.libera 8000
  2292. irc proxy, for server "libera", with SSL:
  2293. /relay add ssl.irc.libera 8001
  2294. irc proxy, for all servers (client will choose), with SSL:
  2295. /relay add ssl.irc 8002
  2296. weechat protocol:
  2297. /relay add weechat 9000
  2298. weechat protocol with SSL:
  2299. /relay add ssl.weechat 9001
  2300. weechat protocol with SSL, using only IPv4:
  2301. /relay add ipv4.ssl.weechat 9001
  2302. weechat protocol with SSL, using only IPv6:
  2303. /relay add ipv6.ssl.weechat 9001
  2304. weechat protocol with SSL, using IPv4 + IPv6:
  2305. /relay add ipv4.ipv6.ssl.weechat 9001
  2306. weechat protocol over UNIX domain socket:
  2307. /relay add unix.weechat ${weechat_runtime_dir}/relay_socket
  2308. ----
  2309. // end::relay_commands[]
  2310. // tag::ruby_commands[]
  2311. [[command_ruby_ruby]]
  2312. * `+ruby+`: list/load/unload scripts
  2313. ----
  2314. /ruby list|listfull [<name>]
  2315. load [-q] <filename>
  2316. autoload
  2317. reload|unload [-q] [<name>]
  2318. eval [-o|-oc] <code>
  2319. version
  2320. list: list loaded scripts
  2321. listfull: list loaded scripts (verbose)
  2322. load: load a script
  2323. autoload: load all scripts in "autoload" directory
  2324. reload: reload a script (if no name given, unload all scripts, then load all scripts in "autoload" directory)
  2325. unload: unload a script (if no name given, unload all scripts)
  2326. filename: script (file) to load
  2327. -q: quiet mode: do not display messages
  2328. name: a script name (name used in call to "register" function)
  2329. eval: evaluate source code and display result on current buffer
  2330. -o: send evaluation result to the buffer without executing commands
  2331. -oc: send evaluation result to the buffer and execute commands
  2332. code: source code to evaluate
  2333. version: display the version of interpreter used
  2334. Without argument, this command lists all loaded scripts.
  2335. ----
  2336. // end::ruby_commands[]
  2337. // tag::script_commands[]
  2338. [[command_script_script]]
  2339. * `+script+`: WeeChat script manager
  2340. ----
  2341. /script list [-o|-ol|-i|-il]
  2342. search <text>
  2343. show <script>
  2344. load|unload|reload <script> [<script>...]
  2345. autoload|noautoload|toggleautoload <script> [<script>...]
  2346. install|remove|installremove|hold [-q] <script> [<script>...]
  2347. upgrade
  2348. update
  2349. list: list loaded scripts (all languages)
  2350. -o: send list of loaded scripts to buffer (string in English)
  2351. -ol: send list of loaded scripts to buffer (translated string)
  2352. -i: copy list of loaded scripts in command line (for sending to buffer) (string in English)
  2353. -il: copy list of loaded scripts in command line (for sending to buffer) (translated string)
  2354. search: search scripts by tags, language (python, perl, ...), filename extension (py, pl, ...) or text; result is displayed on scripts buffer
  2355. show: show detailed info about a script
  2356. load: load script(s)
  2357. unload: unload script(s)
  2358. reload: reload script(s)
  2359. autoload: autoload the script
  2360. noautoload: do not autoload the script
  2361. toggleautoload: toggle autoload
  2362. install: install/upgrade script(s)
  2363. remove: remove script(s)
  2364. installremove: install or remove script(s), depending on current state
  2365. hold: hold/unhold script(s) (a script held will not be upgraded any more and cannot be removed)
  2366. -q: quiet mode: do not display messages
  2367. upgrade: upgrade all installed scripts which are obsolete (new version available)
  2368. update: update local scripts cache
  2369. Without argument, this command opens a buffer with list of scripts.
  2370. On script buffer, the possible status for each script are:
  2371. * i a H r N
  2372. | | | | | |
  2373. | | | | | obsolete (new version available)
  2374. | | | | running (loaded)
  2375. | | | held
  2376. | | autoloaded
  2377. | installed
  2378. popular script
  2379. In output of /script list, the possible status for each script are:
  2380. * ? i a H N
  2381. | | | | | |
  2382. | | | | | obsolete (new version available)
  2383. | | | | held
  2384. | | | autoloaded
  2385. | | installed
  2386. | unknown script (can not be downloaded/updated)
  2387. popular script
  2388. Keys on script buffer:
  2389. alt+i install script
  2390. alt+r remove script
  2391. alt+l load script
  2392. alt+L reload script
  2393. alt+u unload script
  2394. alt+A autoload script
  2395. alt+h (un)hold script
  2396. alt+v view script
  2397. Input allowed on script buffer:
  2398. i/r/l/L/u/A/h/v action on script (same as keys above)
  2399. q close buffer
  2400. $ refresh buffer
  2401. s:x,y sort buffer using keys x and y (see /help script.look.sort)
  2402. s: reset sort (use default sort)
  2403. word(s) filter scripts: search word(s) in scripts (description, tags, ...)
  2404. * remove filter
  2405. Mouse actions on script buffer:
  2406. wheel scroll list
  2407. left button select script
  2408. right button install/remove script
  2409. Examples:
  2410. /script search url
  2411. /script install go.py urlserver.py
  2412. /script remove go.py
  2413. /script hold urlserver.py
  2414. /script reload urlserver
  2415. /script upgrade
  2416. ----
  2417. // end::script_commands[]
  2418. // tag::spell_commands[]
  2419. [[command_spell_spell]]
  2420. * `+spell+`: spell plugin configuration
  2421. ----
  2422. /spell enable|disable|toggle
  2423. listdict
  2424. setdict <dict>[,<dict>...]
  2425. deldict
  2426. addword [<dict>] <word>
  2427. enable: enable spell checker
  2428. disable: disable spell checker
  2429. toggle: toggle spell checker
  2430. listdict: show installed dictionaries
  2431. setdict: set dictionary for current buffer (multiple dictionaries can be separated by a comma)
  2432. deldict: delete dictionary used on current buffer
  2433. addword: add a word in personal dictionary
  2434. Input line beginning with a '/' is not checked, except for some commands (see /set spell.check.commands).
  2435. To enable spell checker on all buffers, use option "default_dict", then enable spell checker, for example:
  2436. /set spell.check.default_dict "en"
  2437. /spell enable
  2438. To display a list of suggestions in a bar, use item "spell_suggest".
  2439. Default key to toggle spell checker is alt-s.
  2440. ----
  2441. // end::spell_commands[]
  2442. // tag::tcl_commands[]
  2443. [[command_tcl_tcl]]
  2444. * `+tcl+`: list/load/unload scripts
  2445. ----
  2446. /tcl list|listfull [<name>]
  2447. load [-q] <filename>
  2448. autoload
  2449. reload|unload [-q] [<name>]
  2450. eval [-o|-oc] <code>
  2451. version
  2452. list: list loaded scripts
  2453. listfull: list loaded scripts (verbose)
  2454. load: load a script
  2455. autoload: load all scripts in "autoload" directory
  2456. reload: reload a script (if no name given, unload all scripts, then load all scripts in "autoload" directory)
  2457. unload: unload a script (if no name given, unload all scripts)
  2458. filename: script (file) to load
  2459. -q: quiet mode: do not display messages
  2460. name: a script name (name used in call to "register" function)
  2461. eval: evaluate source code and display result on current buffer
  2462. -o: send evaluation result to the buffer without executing commands
  2463. -oc: send evaluation result to the buffer and execute commands
  2464. code: source code to evaluate
  2465. version: display the version of interpreter used
  2466. Without argument, this command lists all loaded scripts.
  2467. ----
  2468. // end::tcl_commands[]
  2469. // tag::trigger_commands[]
  2470. [[command_trigger_trigger]]
  2471. * `+trigger+`: manage triggers, the Swiss Army knife for WeeChat
  2472. ----
  2473. /trigger list|listfull|listdefault
  2474. add|addoff|addreplace <name> <hook> ["<arguments>" ["<conditions>" ["<regex>" ["<command>" ["<return_code>" ["<post_action>"]]]]]]
  2475. addinput [<hook>]
  2476. input|output|recreate <name>
  2477. set <name> <option> <value>
  2478. rename|copy <name> <new_name>
  2479. enable|disable|toggle [<name>|-all [<name>...]]
  2480. restart <name>|-all [<name>...]
  2481. show <name>
  2482. del <name>|-all [<name>...]
  2483. restore <name> [<name>...]
  2484. default -yes
  2485. monitor [<filter>]
  2486. list: list triggers (without argument, this list is displayed)
  2487. listfull: list triggers with detailed info for each trigger
  2488. listdefault: list default triggers
  2489. add: add a trigger
  2490. addoff: add a trigger (disabled)
  2491. addreplace: add or replace an existing trigger
  2492. name: name of trigger
  2493. hook: signal, hsignal, modifier, line, print, command, command_run, timer, config, focus, info, info_hashtable
  2494. arguments: arguments for the hook, depending on hook (separated by semicolons):
  2495. signal: name(s) of signal (required)
  2496. hsignal: name(s) of hsignal (required)
  2497. modifier: name(s) of modifier (required)
  2498. line: buffer type ("formatted", "free" or "*"), list of buffer masks, tags
  2499. print: buffer, tags, message, strip colors
  2500. command: command (required), description, arguments, description of arguments, completion (all arguments except command are evaluated, "${tg_trigger_name}" is replaced by the trigger name, see /help eval)
  2501. command_run: command(s) (required)
  2502. timer: interval (required), align on second, max calls
  2503. config: name(s) of option (required)
  2504. focus: name(s) of area (required)
  2505. info: name(s) of info (required)
  2506. info_hashtable: name(s) of info (required)
  2507. conditions: evaluated conditions for the trigger
  2508. regex: one or more regular expressions to replace strings in variables
  2509. command: command to execute (many commands can be separated by ";")
  2510. return_code: return code in callback (ok (default), ok_eat, error)
  2511. post_action: action to take after execution (none (default), disable, delete)
  2512. addinput: set input with default arguments to create a trigger
  2513. input: set input with the command used to create the trigger
  2514. output: send the command to create the trigger on the buffer
  2515. recreate: same as "input", with option "addreplace" instead of "add"
  2516. set: set an option in a trigger
  2517. option: name of option: name, hook, arguments, conditions, regex, command, return_code
  2518. (for help on option, you can type: /help trigger.trigger.<name>.<option>)
  2519. value: new value for the option
  2520. rename: rename a trigger
  2521. copy: copy a trigger
  2522. enable: enable trigger(s) (without arguments: enable triggers globally)
  2523. disable: disable trigger(s) (without arguments: disable triggers globally)
  2524. toggle: toggle trigger(s) (without arguments: toggle triggers globally)
  2525. restart: restart trigger(s) (recreate the hooks)
  2526. show: show detailed info on a trigger (with some stats)
  2527. del: delete a trigger
  2528. -all: do action on all triggers
  2529. restore: restore trigger(s) with the default values (works only for default triggers)
  2530. default: delete all triggers and restore default ones
  2531. monitor: open the trigger monitor buffer, with optional filter:
  2532. filter: filter hooks/triggers to display (a hook must start with "@", for example "@signal"), many filters can be separated by commas; wildcard "*" is allowed in each trigger name
  2533. When a trigger callback is called, following actions are performed, in this order:
  2534. 1. check conditions; if false, exit
  2535. 2. replace text using POSIX extended regular expression(s) (if defined in trigger)
  2536. 3. execute command(s) (if defined in trigger)
  2537. 4. exit with a return code (except for modifier, line, focus, info and info_hashtable)
  2538. 5. perform post action
  2539. Examples (you can also look at default triggers with /trigger listdefault):
  2540. add text attributes *bold*, _underline_ and /italic/ (only in user messages):
  2541. /trigger add effects modifier weechat_print "${tg_tag_nick}" "==\*([^ ]+)\*==*${color:bold}${re:1}${color:-bold}*== ==_([^ ]+)_==_${color:underline}${re:1}${color:-underline}_== ==/([^ ]+)/==/${color:italic}${re:1}${color:-italic}/"
  2542. hide nicklist bar on small terminals:
  2543. /trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist"
  2544. /trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist"
  2545. silently save config each hour:
  2546. /trigger add cfgsave timer 3600000;0;0 "" "" "/mute /save"
  2547. open trigger monitor and show only modifiers and triggers whose name starts with "resize":
  2548. /trigger monitor @modifier,resize*
  2549. ----
  2550. // end::trigger_commands[]