Permalink
Browse files

fifo: add file fifo.conf and option fifo.file.path to customize FIFO …

…pipe path/filename (closes #850)
  • Loading branch information...
1 parent fe95a1c commit 0cec295a41e47e4fcaa3dea39933f7d082f93c7b @flashcode flashcode committed Nov 22, 2016
Showing with 841 additions and 496 deletions.
  1. +1 −0 ChangeLog.adoc
  2. +12 −0 ReleaseNotes.adoc
  3. +12 −12 doc/de/autogen/user/fifo_commands.adoc
  4. +13 −0 doc/de/autogen/user/fifo_options.adoc
  5. +23 −26 doc/de/weechat_user.de.adoc
  6. +2 −2 doc/en/autogen/user/fifo_commands.adoc
  7. +13 −0 doc/en/autogen/user/fifo_options.adoc
  8. +1 −0 doc/en/weechat_dev.en.adoc
  9. +21 −27 doc/en/weechat_user.en.adoc
  10. +2 −2 doc/fr/autogen/user/fifo_commands.adoc
  11. +13 −0 doc/fr/autogen/user/fifo_options.adoc
  12. +1 −0 doc/fr/weechat_dev.fr.adoc
  13. +21 −27 doc/fr/weechat_user.fr.adoc
  14. +2 −2 doc/it/autogen/user/fifo_commands.adoc
  15. +13 −0 doc/it/autogen/user/fifo_options.adoc
  16. +28 −28 doc/it/weechat_user.it.adoc
  17. +12 −12 doc/ja/autogen/user/fifo_commands.adoc
  18. +13 −0 doc/ja/autogen/user/fifo_options.adoc
  19. +1 −0 doc/ja/weechat_dev.ja.adoc
  20. +25 −26 doc/ja/weechat_user.ja.adoc
  21. +12 −12 doc/pl/autogen/user/fifo_commands.adoc
  22. +13 −0 doc/pl/autogen/user/fifo_options.adoc
  23. +26 −27 doc/pl/weechat_user.pl.adoc
  24. +2 −0 po/POTFILES.in
  25. +23 −11 po/cs.po
  26. +23 −10 po/de.po
  27. +23 −11 po/es.po
  28. +24 −15 po/fr.po
  29. +21 −10 po/hu.po
  30. +23 −11 po/it.po
  31. +23 −10 po/ja.po
  32. +23 −10 po/pl.po
  33. +23 −10 po/pt.po
  34. +19 −11 po/pt_BR.po
  35. +21 −10 po/ru.po
  36. +2 −0 po/srcfiles.cmake
  37. +15 −11 po/tr.po
  38. +13 −9 po/weechat.pot
  39. +1 −0 src/plugins/fifo/CMakeLists.txt
  40. +2 −0 src/plugins/fifo/Makefile.am
  41. +9 −7 src/plugins/fifo/fifo-command.c
  42. +160 −0 src/plugins/fifo/fifo-config.c
  43. +34 −0 src/plugins/fifo/fifo-config.h
  44. +73 −147 src/plugins/fifo/fifo.c
  45. +4 −0 src/plugins/fifo/fifo.h
View
@@ -21,6 +21,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
New features::
* api: add info "pid" (WeeChat PID) (issue #850)
+ * fifo: add file fifo.conf and option fifo.file.path to customize FIFO pipe path/filename (issue #850)
Improvements::
View
@@ -20,6 +20,18 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
[[v1.7]]
== Version 1.7 (under dev)
+[[v1.7_fifo_options]]
+=== FIFO options
+
+A new configuration file "fifo.conf" has been added and the old option
+_plugins.var.fifo.fifo_ has been moved to _fifo.file.enabled_.
+
+A new option _fifo.file.path_ can be used to customize the FIFO pipe
+path/filename.
+
+[[v1.7_default_triggers]]
+=== Default triggers
+
A new trigger "cmd_pass_register" has been added to hide only password and not
email in command `/msg nickserv register password email`. +
The existing trigger "cmd_pass" has been updated to hide password in all
@@ -8,22 +8,22 @@
----
/fifo enable|disable|toggle
- enable: aktivieren der FIFO pipe
-disable: deaktivieren der FIFO pipe
- toggle: Status der FIFO pipe umschalten
+ enable: enable FIFO pipe
+disable: disable FIFO pipe
+ toggle: toggle FIFO pipe
-Die FIFO-Pipe wird als Fernbedienung genutzt, es können Befehle oder Text von der Shell an die FIFO-Pipe geschickt werden
-Standardmäßig ist die FIFO-Pipe in ~/.weechat/weechat_fifo_xxx ("xxx" ist die PID von WeeChat).
+FIFO pipe is used as remote control of WeeChat: you can send commands or text to the FIFO pipe from your shell.
+By default the FIFO pipe is in ~/.weechat/weechat_fifo
-Folgendes Format wird erwartet:
- plugin.buffer *Text oder Befehl an dieser Stelle
- *Text oder Befehl an dieser Stelle
+The expected format is one of:
+ plugin.buffer *text or command here
+ *text or command here
-Beispiel um den Nick auf dem Server freenode zu ändern:
- echo 'irc.server.freenode */nick neuer_Nick' >~/.weechat/weechat_fifo_12345
+For example to change your freenode nick:
+ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
-Bitte lese die Benutzeranleitung für weitere Informationen und Beispiele.
+Please read the user's guide for more info and examples.
-Beispiele:
+Examples:
/fifo toggle
----
@@ -0,0 +1,13 @@
+//
+// This file is auto-generated by script docgen.py.
+// DO NOT EDIT BY HAND!
+//
+* [[option_fifo.file.enabled]] *fifo.file.enabled*
+** Beschreibung: pass:none[enable FIFO pipe]
+** Typ: boolesch
+** Werte: on, off (Standardwert: `+on+`)
+
+* [[option_fifo.file.path]] *fifo.file.path*
+** Beschreibung: pass:none[path for FIFO file; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default); WeeChat PID can be used in path with ${info:pid} (note: content is evaluated, see /help eval)]
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `+"%h/weechat_fifo"+`)
@@ -2121,11 +2121,11 @@ include::autogen/user/exec_commands.adoc[]
=== Fifo Erweiterung
Sie können WeeChat fern steuern indem Sie Befehle oder einen Text an die FIFO Pipe
-schicken (dazu muss die Option "plugins.var.fifo.fifo" aktiviert sein (standardmäßig
+schicken (dazu muss die Option "fifo.file.enabled" aktiviert sein (standardmäßig
ist diese Option aktiviert).
-Die FIFO pipe findet man in _~/.weechat/_ und heisst _weechat_fifo_xxxx_
-(_xxxx_ ist dabei die ID (PID) der laufenden WeeChat Session).
+// TRANSLATION MISSING
+The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_ by default.
Die Syntax der FIFO Pipe Befehle/Text sieht wie folgt aus:
@@ -2136,49 +2136,46 @@ Die Syntax der FIFO Pipe Befehle/Text sieht wie folgt aus:
einige Beispiele:
-* Den eigenen Nick auf dem IRC Server freenode in "newnick" ändern:
+* Change nick on IRC server freenode to "newnick":
----
-$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
----
-* Den Text _Hallo!_ in den Channel #weechat schreiben:
+* Send a message on IRC #weechat channel:
----
-$ echo 'irc.freenode.#weechat *Hallo!' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo
----
-* Einen Text im aktuellen Buffer ausgeben:
+* Send a message on current buffer:
----
-$ echo '*hello!' >~/.weechat/weechat_fifo_12345
+$ echo '*hello!' >~/.weechat/weechat_fifo
----
-* sendet zwei Befehle um alle Python-Skripten zu entfernen und dann neu zu laden (die beiden Befehle müssen
+* Sendet zwei Befehle um alle Python-Skripten zu entfernen und dann neu zu laden (die beiden Befehle müssen
mit "\n" getrennt werden):
----
-$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo_12345
+$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo
----
-Das nachfolgende Skript sendet einen Befehl an alle laufenden WeeChat Instanzen:
+[[fifo_options]]
+==== Optionen (fifo.conf)
-[source,shell]
-----
-#!/bin/sh
-if [ $# -eq 1 ]; then
- for fifo in ~/.weechat/weechat_fifo_*
- do
- echo -e "$1" >$fifo
- done
-fi
-----
+Sektionen:
+
+[width="100%",cols="3m,6m,16",options="header"]
+|===
+| Sektion | Steuerbefehl | Beschreibung
+// TRANSLATION MISSING
+| file | /set fifo.file.* | FIFO pipe control
+|===
-Falls man das Skript "auto_weechat_command" benennt ruft man es wie folgt auf:
+Optionen:
-----
-$ ./auto_weechat_command 'irc.freenode.#weechat *Hallo'
-----
+include::autogen/user/fifo_options.adoc[]
[[fifo_commands]]
==== Befehle
@@ -13,14 +13,14 @@ disable: disable FIFO pipe
toggle: toggle FIFO pipe
FIFO pipe is used as remote control of WeeChat: you can send commands or text to the FIFO pipe from your shell.
-By default the FIFO pipe is in ~/.weechat/weechat_fifo_xxx ("xxx" is the WeeChat PID).
+By default the FIFO pipe is in ~/.weechat/weechat_fifo
The expected format is one of:
plugin.buffer *text or command here
*text or command here
For example to change your freenode nick:
- echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345
+ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
Please read the user's guide for more info and examples.
@@ -0,0 +1,13 @@
+//
+// This file is auto-generated by script docgen.py.
+// DO NOT EDIT BY HAND!
+//
+* [[option_fifo.file.enabled]] *fifo.file.enabled*
+** description: pass:none[enable FIFO pipe]
+** type: boolean
+** values: on, off (default value: `+on+`)
+
+* [[option_fifo.file.path]] *fifo.file.path*
+** description: pass:none[path for FIFO file; "%h" at beginning of string is replaced by WeeChat home ("~/.weechat" by default); WeeChat PID can be used in path with ${info:pid} (note: content is evaluated, see /help eval)]
+** type: string
+** values: any string (default value: `+"%h/weechat_fifo"+`)
@@ -204,6 +204,7 @@ WeeChat "core" is located in following directories:
|    fifo/ | Fifo plugin
|       fifo.c | Main fifo functions
|       fifo-command.c | Fifo commands
+|       fifo-config.c | Fifo config options (file fifo.conf)
|       fifo-info.c | Fifo info/infolists/hdata
|    guile/ | Guile (scheme) plugin
|       weechat-guile.c | Main guile functions (load/unload scripts, execute guile code)
@@ -2072,10 +2072,9 @@ include::autogen/user/exec_commands.adoc[]
=== Fifo plugin
You can remote control WeeChat, by sending commands or text to a FIFO pipe (if
-option "plugins.var.fifo.fifo" is enabled, it is by default).
+option "fifo.file.enabled" is enabled, it is by default).
-The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_xxxx_
-(where _xxxx_ is the process ID (PID) of running WeeChat).
+The FIFO pipe is located in _~/.weechat/_ and is called _weechat_fifo_ by default.
Syntax for the FIFO pipe commands/text is one of following:
@@ -2086,50 +2085,45 @@ Syntax for the FIFO pipe commands/text is one of following:
Some examples:
-* nick change on IRC server freenode to "newnick":
+* Change nick on IRC server freenode to "newnick":
----
-$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.server.freenode */nick newnick' >~/.weechat/weechat_fifo
----
-* display text on IRC #weechat channel:
+* Send a message on IRC #weechat channel:
----
-$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo_12345
+$ echo 'irc.freenode.#weechat *hello!' >~/.weechat/weechat_fifo
----
-* display text on current buffer:
+* Send a message on current buffer:
----
-$ echo '*hello!' >~/.weechat/weechat_fifo_12345
+$ echo '*hello!' >~/.weechat/weechat_fifo
----
-* send two commands to unload/reload Python scripts (you have to separate them
+* Send two commands to unload/reload Python scripts (you have to separate them
with "\n"):
----
-$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo_12345
+$ printf '%b' '*/python unload\n*/python autoload\n' >~/.weechat/weechat_fifo
----
-You can write a script to send command to all running WeeChat at same time,
-for example:
+[[fifo_options]]
+==== Options (fifo.conf)
-[source,shell]
-----
-#!/bin/sh
-if [ $# -eq 1 ]; then
- for fifo in ~/.weechat/weechat_fifo_*
- do
- printf '%b\n' "$1" >"$fifo"
- done
-fi
-----
+Sections:
+
+[width="100%",cols="3m,6m,16",options="header"]
+|===
+| Section | Control command | Description
+| file | /set fifo.file.* | FIFO pipe control
+|===
-If the script is called "auto_weechat_command", you can run it with:
+Options:
-----
-$ ./auto_weechat_command 'irc.freenode.#weechat *hello'
-----
+include::autogen/user/fifo_options.adoc[]
[[fifo_commands]]
==== Commands
@@ -13,14 +13,14 @@ disable : désactiver le tube FIFO
toggle : activer/désactiver le tube FIFO
Le tube FIFO est utilisé comme contrôle à distance de WeeChat : vous pouvez envoyer des commandes ou du texte au tube FIFO depuis votre shell.
-Par défaut le tube FIFO est dans ~/.weechat/weechat_fifo_xxx ("xxx" est le PID de WeeChat).
+Par défaut le tube FIFO est dans ~/.weechat/weechat_fifo
Le format attendu est l'un des suivants :
plugin.buffer *texte ou commande ici
*texte ou commande ici
Par exemple pour changer votre pseudo sur freenode :
- echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/weechat_fifo_12345
+ echo 'irc.server.freenode */nick autrepseudo' >~/.weechat/weechat_fifo
Merci de lire le guide utilisateur pour plus d'information et des exemples.
@@ -0,0 +1,13 @@
+//
+// This file is auto-generated by script docgen.py.
+// DO NOT EDIT BY HAND!
+//
+* [[option_fifo.file.enabled]] *fifo.file.enabled*
+** description: pass:none[activer le tube FIFO]
+** type: booléen
+** valeurs: on, off (valeur par défaut: `+on+`)
+
+* [[option_fifo.file.path]] *fifo.file.path*
+** description: pass:none[chemin pour le tube FIFO ; "%h" au début de la chaîne est remplacé par le répertoire de base WeeChat (par défaut : "~/.weechat") ; le PID de WeeChat peut être utilisé dans le chemin avec ${info:pid} (note : le contenu est évalué, voir /help eval)]
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `+"%h/weechat_fifo"+`)
@@ -206,6 +206,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|    fifo/ | Extension Fifo
|       fifo.c | Fonctions principales de Fifo
|       fifo-command.c | Commandes pour Fifo
+|       fifo-config.c | Options de configuration pour Fifo (fichier fifo.conf)
|       fifo-info.c | Info/infolists/hdata pour Fifo
|    guile/ | Extension Guile (scheme)
|       weechat-guile.c | Fonctions principales pour Guile (chargement/déchargement des scripts, exécution de code Guile)
Oops, something went wrong.

0 comments on commit 0cec295

Please sign in to comment.