summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/de/includes/autogen_user_commands.de.adoc171
-rw-r--r--doc/en/includes/autogen_user_commands.en.adoc21
-rw-r--r--doc/en/weechat_plugin_api.en.adoc3
-rw-r--r--doc/fr/includes/autogen_user_commands.fr.adoc23
-rw-r--r--doc/fr/weechat_plugin_api.fr.adoc3
-rw-r--r--doc/it/includes/autogen_user_commands.it.adoc21
-rw-r--r--doc/it/weechat_plugin_api.it.adoc3
-rw-r--r--doc/ja/includes/autogen_user_commands.ja.adoc21
-rw-r--r--doc/ja/weechat_plugin_api.ja.adoc4
-rw-r--r--doc/pl/includes/autogen_user_commands.pl.adoc171
-rw-r--r--doc/sr/includes/autogen_user_commands.sr.adoc175
-rw-r--r--doc/sr/weechat_plugin_api.sr.adoc4
12 files changed, 345 insertions, 275 deletions
diff --git a/doc/de/includes/autogen_user_commands.de.adoc b/doc/de/includes/autogen_user_commands.de.adoc
index 4bc00e05a..d5b7c739d 100644
--- a/doc/de/includes/autogen_user_commands.de.adoc
+++ b/doc/de/includes/autogen_user_commands.de.adoc
@@ -2122,35 +2122,42 @@ Beispiele:
----
[[command_weechat_upgrade]]
-* `+upgrade+`: WeeChat Binärdatei neu laden, ohne die Verbindung zum Server zu trennen
+* `+upgrade+`: save WeeChat session and reload the WeeChat binary without disconnecting from servers
----
-/upgrade [-yes] [<path_to_binary>|-quit]
+/upgrade [-yes] [<path_to_binary>|-save|-quit]
- -yes: wird benötigt, sobald Option "weechat.look.confirm_upgrade" aktiviert ist
-path_to_binary: Pfad zu einer ausführbaren WeeChat Binärdatei (Standardeinstellung ist die aktuell ausführbare Datei)
- -dummy: ohne Funktion (dient lediglich dazu, um nicht versehentlich die "-quit" Funktion auszuführen)
- -quit: trennt *ALLE* Verbindungen, speichert die aktuelle Sitzung und beendet WeeChat, um den aktuellen Zustand später wiederherstellen (siehe unten)
+ -yes: required if option "weechat.look.confirm_upgrade" is enabled
+path_to_binary: path to WeeChat binary (default is current binary)
+ -dummy: do nothing (option used to prevent accidental completion with "-quit")
+ -save: only save the session, do not quit nor reload WeeChat; the configuration files are not saved (if needed you can use /save before this command)
+ -quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
-Dieser Befehl führt ein Upgrade von WeeChat durch und startet die laufende Sitzung neu. Bevor dieser Befehl ausgeführt wird, sollte eine neue Version von WeeChat entweder vorab kompiliert, oder mit einem Paketmanager installiert worden sein.
+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.
-Hinweis: SSL Verbindungen werden während eines Upgrades unterbrochen, da diese Verbindungen zur Zeit nicht mit GnuTLS gehalten werden können. Nach einem erfolgten Upgrade findet eine automatische Verbindung zu diesen Servern statt.
+Note: SSL connections are lost during upgrade (except with -save), because the reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
-Der Upgrade Vorgang besteht aus vier Schritten:
- 1. Sicherung der Sitzung, in Dateien für Core und Erweiterungen (buffers, history, ..)
- 2. alle Erweiterungen werden ausgeschaltet (Konfigurationen *.conf werden gesichert)
- 3. Sicherung der WeeChat Konfiguration (weechat.conf)
- 4. ausführen der neuen Version von WeeChat und wiederherstellen der Sitzung.
+Important: use of option -save can be dangerous, it is recommended to use only /upgrade (or with -quit) for a standard upgrade and a restart; the option -save can be used to save the session regularly and restore it in case of after abnormal exit (power outage, crash, etc.)
-Nutzt man die "-quit" Funktion ist die Abfolge geringfügig anders:
- 1. es werden *ALLE* Verbindungen getrennt (irc,xfer,relay, ...)
- 2. die Sitzung wird in Dateien gesichert (*.upgrade)
- 3. alle Erweiterungen werden ausgeschaltet
- 4. die WeeChat Konfiguration wird gesichert
- 5. WeeChat wird beendet
-Die Sitzung kann zu einem späteren Zeitpunkt wiederhergestellt werden: weechat --upgrade
-WICHTIG: Die Sitzung muss mit exakt den selben Konfigurationsdateien wiederhergestellt werden (*.conf)
-Es ist möglich, die WeeChat-Sitzung auf einem anderen Computer wiederherzustellen, wenn Sie den Inhalt der WeeChat Verzeichnisse kopieren (siehe / debug dirs).
+Upgrade process has 4 steps:
+ 1. save session into files for core and plugins (buffers, history, ..)
+ 2. unload all plugins (configuration files (*.conf) are written on disk)
+ 3. save WeeChat configuration (weechat.conf)
+ 4. execute new WeeChat binary and reload session.
+
+With option "-quit", the process is:
+ 1. close *ALL* connections (irc, xfer, relay, ...)
+ 2. save session into files (*.upgrade)
+ 3. unload all plugins
+ 4. save WeeChat configuration
+ 5. quit WeeChat
+
+With option "-save", the process is:
+ 1. save session into files (*.upgrade) with a disconnected state for IRC servers and Relay clients (but no disconnection is made)
+
+With -quit or -save, you can restore the session later with this command: weechat --upgrade
+IMPORTANT: you must restore the session with exactly same configuration (files *.conf) and if possible the same WeeChat version (or a more recent one).
+It is possible to restore WeeChat session on another machine if you copy the content of WeeChat home directories (see /debug dirs).
----
[[command_weechat_uptime]]
@@ -3130,70 +3137,72 @@ Ohne Angabe eines Argumentes listet dieser Befehl alle geladenen Skripten auf.
default -yes
monitor [<filter>]
- list: zeigt eine Liste aller Trigger (ohne Angabe von Argumente wird diese Liste standardmäßig ausgegeben)
- listfull: zeigt eine detaillierte Liste, mit zusätzlichen Informationen, aller Trigger an
-listdefault: zeigt die standardmäßig genutzten Trigger an
- add: fügt einen Trigger hinzu
- addoff: fügt einen Trigger hinzu (deaktiviert)
- addreplace: erzeugt neuen Trigger oder ersetzt einen schon existierenden Trigger
- name: Name des Trigger
+ list: list triggers (without argument, this list is displayed)
+ listfull: list triggers with detailed info for each trigger
+listdefault: list default triggers
+ add: add a trigger
+ addoff: add a trigger (disabled)
+ addreplace: add or replace an existing trigger
+ name: name of trigger
hook: signal, hsignal, modifier, line, print, command, command_run, timer, config, focus, info, info_hashtable
- arguments: Argumente für den Hook, abhängig vom genutzten Hook (getrennt durch Semikolon):
- signal: Name(en) des signals (erforderlich)
- hsignal: Name(en) des hsignal (erforderlich)
- modifier: Name(en) des modifier (erforderlich)
- line: Buffertyp ("formatted", "free" oder "*"), Liste von Buffermasken, Tags
- print: Buffer, Tags, Nachricht, Farben entfernen
- command: Befehl (erforderlich), Beschreibung, Argumente, Beschreibung der Argumente, Vervollständigung (alle Argumente, außer dem Befehl werden ausgewertet, "${tg_trigger_name}" wird durch den Triggernamen ersetzt, siehe /help eval)
- command_run: Befehl(e) (erforderlich)
- timer: Intervall (erforderlich), Anpassung an Sekunden (erforderlich), maximale Anzahl an Aufrufen
- config: Name der Einstellung (erforderlich)
- focus: Name(n) für sichtbaren Bereich (erforderlich) (z.B. "chat" für Chatbereich)
- info: Name(n) der Information (erforderlich)
- info_hashtable: Name(n) der Information (erforderlich)
- conditions: evaluierte Bedingungen für den Trigger
- regex: einer oder mehrere reguläre Ausdrücke um Zeichenketten in Variablen zu ersetzen
- command: Befehl welcher ausgeführt werden soll (mehrere Befehle müssen durch ";" voneinander getrennt werden)
-return_code: Rückgabewert für Callback (ok (standard), ok_eat, error)
-post_action: Aktion welche nach der Abarbeitung des Triggers ausgeführt werden soll (none (Standardwert), disable, delete)
- addinput: erstellt einen Trigger mit einer standardmäßigen Mustervorlage
- input: kopiert den kompletten Trigger-Befehl in die Eingabezeile
- output: schickt den Trigger-Befehl als Text in den Buffer
- recreate: wie "input", allerdings wird die Einstellung "addreplace" anstelle von "add" genutzt
- set: definiert, innerhalb eines Triggers, eine Einstellung neu
- option: Name einer Einstellung: name, hook, arguments, conditions, regex, command, return_code
- (um Hilfe über eine Einstellung zu erhalten: /help trigger.trigger.<name>.<option>)
- value: neuer Wert für Einstellung
- rename: benennt einen Trigger um
- copy: kopiert einen Trigger
- enable: aktiviert Trigger (ohne Angabe von Argumenten: aktiviert alle Trigger)
- disable: deaktiviert Trigger (ohne Angabe von Argumenten: deaktiviert alle Trigger)
- toggle: de-/aktiviert Trigger (ohne Angabe von Argumenten: de-/aktiviert alle Trigger)
- restart: startet Trigger neu (Hook(s) werden neu erstellt)
- show: zeigt detaillierte Informationen zu einem Trigger (inklusive einer kleinen Statistik)
- del: entfernt einen Trigger
- -all: führt eine Aktion aus, die alle Trigger beinhaltet
- restore: stellt Trigger mit Standardwerten wieder her (funktioniert nur bei vorgegebenen Triggern)
- default: stellt die standardmäßigen Trigger wieder her
- monitor: öffnet den Trigger Monitor-Buffer, mit optionaler Filterfunktion:
- filter: filtert Hooks/Trigger zum Anzeigen (ein Hook muss mit "@" beginnen, zum Beispiel "@signal"), mehrere Filter können durch Kommata voneinander getrennt werden; Platzhalter "*" kann im Namen des Trigger verwendet werden
-
-Wenn ein Trigger-Callback aufgerufen wird, dann wird folgende Befehlskette ausgeführt:
- 1. Überprüfung von Bedingungen; falls unwahr, beenden
- 2. ersetze Text mittels einem oder mehreren erweiterten regulären POSIX Ausdrücken (sofern im Trigger definiert)
- 3. ein oder mehrere Befehle werden ausgeführt (sofern im Trigger definiert)
- 4. Beendigung mit einem Rückgabewert (ausgenommen sind modifiers, line, focus, info und info_hashtable)
- 5. Aktion welche nach der Abarbeitung des Triggers ausgeführt werden soll
-
-Beispiele (die standardmäßig verfügbaren Trigger kann man sich mit "/trigger listdefault" anzeigen lassen):
- fügt einer Nachricht die Textattribute *fett*, _unterstrichen_ und /kursiv/ hinzu:
+ arguments: arguments for the hook, depending on hook (separated by semicolons):
+ signal: name(s) of signal (required)
+ hsignal: name(s) of hsignal (required)
+ modifier: name(s) of modifier (required)
+ line: buffer type ("formatted", "free" or "*"), list of buffer masks, tags
+ print: buffer, tags, message, strip colors
+ 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)
+ command_run: command(s) (required)
+ timer: interval (required), align on second, max calls
+ config: name(s) of option (required)
+ focus: name(s) of area (required)
+ info: name(s) of info (required)
+ info_hashtable: name(s) of info (required)
+ conditions: evaluated conditions for the trigger
+ regex: one or more regular expressions to replace strings in variables
+ command: command to execute (many commands can be separated by ";")
+return_code: return code in callback (ok (default), ok_eat, error)
+post_action: action to take after execution (none (default), disable, delete)
+ addinput: set input with default arguments to create a trigger
+ input: set input with the command used to create the trigger
+ output: send the command to create the trigger on the buffer
+ recreate: same as "input", with option "addreplace" instead of "add"
+ set: set an option in a trigger
+ option: name of option: name, hook, arguments, conditions, regex, command, return_code
+ (for help on option, you can type: /help trigger.trigger.<name>.<option>)
+ value: new value for the option
+ rename: rename a trigger
+ copy: copy a trigger
+ enable: enable trigger(s) (without arguments: enable triggers globally)
+ disable: disable trigger(s) (without arguments: disable triggers globally)
+ toggle: toggle trigger(s) (without arguments: toggle triggers globally)
+ restart: restart trigger(s) (recreate the hooks)
+ show: show detailed info on a trigger (with some stats)
+ del: delete a trigger
+ -all: do action on all triggers
+ restore: restore trigger(s) with the default values (works only for default triggers)
+ default: delete all triggers and restore default ones
+ monitor: open the trigger monitor buffer, with optional filter:
+ 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
+
+When a trigger callback is called, following actions are performed, in this order:
+ 1. check conditions; if false, exit
+ 2. replace text using POSIX extended regular expression(s) (if defined in trigger)
+ 3. execute command(s) (if defined in trigger)
+ 4. exit with a return code (except for modifier, line, focus, info and info_hashtable)
+ 5. perform post action
+
+Examples (you can also look at default triggers with /trigger listdefault):
+ add text attributes *bold*, _underline_ and /italic/ (only in user messages):
/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}/"
- verbirgt die Nicklist auf kleineren Terminals:
+ hide nicklist bar on small terminals:
/trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist"
/trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist"
- speichert die Konfiguration jede Stunde ab:
+ silently save config each hour:
/trigger add cfgsave timer 3600000;0;0 "" "" "/mute /save"
- öffnet den Trigger Monitor und zeigt ausschließlich modifier und Trigger an, die mit "resize" im Namen beginnen:
+ silently save WeeChat session at midnight (see /help upgrade):
+ /trigger add session_save signal day_changed "" "" "/mute /upgrade -save"
+ open trigger monitor and show only modifiers and triggers whose name starts with "resize":
/trigger monitor @modifier,resize*
----
// end::trigger_commands[]
diff --git a/doc/en/includes/autogen_user_commands.en.adoc b/doc/en/includes/autogen_user_commands.en.adoc
index deb158732..da8017e48 100644
--- a/doc/en/includes/autogen_user_commands.en.adoc
+++ b/doc/en/includes/autogen_user_commands.en.adoc
@@ -2122,19 +2122,22 @@ Examples:
----
[[command_weechat_upgrade]]
-* `+upgrade+`: reload the WeeChat binary without disconnecting from servers
+* `+upgrade+`: save WeeChat session and reload the WeeChat binary without disconnecting from servers
----
-/upgrade [-yes] [<path_to_binary>|-quit]
+/upgrade [-yes] [<path_to_binary>|-save|-quit]
-yes: required if option "weechat.look.confirm_upgrade" is enabled
path_to_binary: path to WeeChat binary (default is current binary)
-dummy: do nothing (option used to prevent accidental completion with "-quit")
+ -save: only save the session, do not quit nor reload WeeChat; the configuration files are not saved (if needed you can use /save before this command)
-quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
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.
-Note: SSL connections are lost during upgrade, because reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
+Note: SSL connections are lost during upgrade (except with -save), because the reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
+
+Important: use of option -save can be dangerous, it is recommended to use only /upgrade (or with -quit) for a standard upgrade and a restart; the option -save can be used to save the session regularly and restore it in case of after abnormal exit (power outage, crash, etc.)
Upgrade process has 4 steps:
1. save session into files for core and plugins (buffers, history, ..)
@@ -2142,14 +2145,18 @@ Upgrade process has 4 steps:
3. save WeeChat configuration (weechat.conf)
4. execute new WeeChat binary and reload session.
-With option "-quit", the process is slightly different:
+With option "-quit", the process is:
1. close *ALL* connections (irc, xfer, relay, ...)
2. save session into files (*.upgrade)
3. unload all plugins
4. save WeeChat configuration
5. quit WeeChat
-Then later you can restore session with command: weechat --upgrade
-IMPORTANT: you must restore the session with exactly same configuration (files *.conf).
+
+With option "-save", the process is:
+ 1. save session into files (*.upgrade) with a disconnected state for IRC servers and Relay clients (but no disconnection is made)
+
+With -quit or -save, you can restore the session later with this command: weechat --upgrade
+IMPORTANT: you must restore the session with exactly same configuration (files *.conf) and if possible the same WeeChat version (or a more recent one).
It is possible to restore WeeChat session on another machine if you copy the content of WeeChat home directories (see /debug dirs).
----
@@ -3193,6 +3200,8 @@ Examples (you can also look at default triggers with /trigger listdefault):
/trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist"
silently save config each hour:
/trigger add cfgsave timer 3600000;0;0 "" "" "/mute /save"
+ silently save WeeChat session at midnight (see /help upgrade):
+ /trigger add session_save signal day_changed "" "" "/mute /upgrade -save"
open trigger monitor and show only modifiers and triggers whose name starts with "resize":
/trigger monitor @modifier,resize*
----
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index d30cf783a..6ac9e5440 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -10898,7 +10898,8 @@ List of signals sent by WeeChat and plugins:
| Signal SIGWINCH received (terminal was resized).
| weechat | [[hook_signal_upgrade]] upgrade |
-| String: "quit" if "-quit" argument was given for /upgrade, otherwise NULL.
+| String: "quit" if "-quit" argument was given for /upgrade, "save" if "-save"
+ if "-save" argument was given for /upgrade, otherwise NULL.
| Command `/upgrade` issued by user.
| weechat | [[hook_signal_upgrade_ended]] upgrade_ended | 0.3.4
diff --git a/doc/fr/includes/autogen_user_commands.fr.adoc b/doc/fr/includes/autogen_user_commands.fr.adoc
index ad56789e1..2324e7671 100644
--- a/doc/fr/includes/autogen_user_commands.fr.adoc
+++ b/doc/fr/includes/autogen_user_commands.fr.adoc
@@ -2122,34 +2122,41 @@ Exemples :
----
[[command_weechat_upgrade]]
-* `+upgrade+`: relancer le binaire WeeChat sans se déconnecter des serveurs
+* `+upgrade+`: sauvegarder la session WeeChat et relancer le binaire WeeChat sans se déconnecter des serveurs
----
-/upgrade [-yes] [<chemin_vers_binaire>|-quit]
+/upgrade [-yes] [<chemin_vers_binaire>|-save|-quit]
-yes : requis si l'option "weechat.look.confirm_upgrade" est activée
chemin_vers_binaire : chemin vers le binaire WeeChat (par défaut le binaire courant)
-dummy : ne rien faire (option utilisée pour éviter une complétion accidentelle avec "-quit")
- -quit : fermer *TOUTES* les connexions, sauver la session et quitter, ce qui rend possible une restauration différée (voir ci-dessous)
+ -save : sauvegarder seulement la session, ne pas quitter ni relancer WeeChat ; les fichiers de configuration ne sont pas sauvegardés (si besoin vous pouvez utiliser /save avant cette commande)
+ -quit : fermer *TOUTES* les connexions, sauvegarder la session et quitter, ce qui rend possible une restauration différée (voir ci-dessous)
Cette commande met à jour et recharge une session de WeeChat qui tourne. Le nouveau binaire WeeChat doit avoir été compilé ou installé via un gestionnaire de paquet avant de lancer cette commande.
Note : les connexions SSL sont perdues durant la mise à jour, car le rechargement de session SSL n'est pas possible actuellement avec GnuTLS. Il y a une reconnexion automatique après la mise à jour.
+Important : l'utilisation de l'option -save peut être dangereuse, il est recommandé d'utiliser seulement /upgrade (ou avec -quit) pour une mise à jour standard et un redémarrage ; l'option -save peut être utilisée pour sauvegarder régulièrement la session et la restaurer en cas de sortie anormale (panne de courant, crash, etc.).
+
Le processus de mise à jour comporte 4 étapes :
1. sauvegarder la session pour le cœur et les extensions (tampons, historique, ...)
2. décharger toutes les extensions (les fichiers de configuration (*.conf) sont écrits sur disque)
3. sauvegarder la configuration WeeChat (weechat.conf)
4. exécuter le nouveau binaire WeeChat et recharger la session.
-Avec l'option "-quit", le processus est légèrement différent :
+Avec l'option "-quit", le processus est le suivant :
1. fermer *TOUTES* les connexions
2. sauvegarder la session (fichiers *.upgrade)
3. décharger les extensions
4. sauvegarder la configuration WeeChat
5. quitter WeeChat
-Et plus tard vous pouvez restaurer la session avec la commande : weechat --upgrade
-IMPORTANT : vous devez restaurer la session avec exactement la même configuration (fichiers *.conf).
+
+Avec l'option "-save", le processus est le suivant :
+ 1. sauvegarder la session (fichiers *.upgrade) avec un état déconnecté pour les serveurs IRC et les clients Relay (mais aucune déconnexion n'est faite)
+
+Avec "-quit" ou "-save", vous pouvez restaurer la session plus tard avec cette commande : weechat --upgrade
+IMPORTANT : vous devez restaurer la session avec exactement la même configuration (fichiers *.conf) et si possible la même version de WeeChat (ou une plus récente).
Il est également possible de restaurer la session WeeChat sur une autre machine si vous y copiez le contenu des répertoires personnels de WeeChat (voir /debug dirs).
----
@@ -3191,8 +3198,10 @@ Exemples (vous pouvez aussi regarder les triggers par défaut avec /trigger list
cacher la barre de pseudos sur les petits terminaux :
/trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist"
/trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist"
- sauver la configuration chaque heure (de manière silencieuse) :
+ sauver silencieusement la configuration chaque heure :
/trigger add cfgsave timer 3600000;0;0 "" "" "/mute /save"
+ sauver silencieusement la session WeeChat à minuit (voir /help upgrade) :
+ /trigger add session_save signal day_changed "" "" "/mute /upgrade -save"
ouvrir le tampon moniteur des triggers et afficher seulement les modificateurs et les triggers dont le nom commence par "resize" :
/trigger monitor @modifier,resize*
----
diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc
index 9c16ea295..6b74e6c6a 100644
--- a/doc/fr/weechat_plugin_api.fr.adoc
+++ b/doc/fr/weechat_plugin_api.fr.adoc
@@ -11116,7 +11116,8 @@ Liste des signaux envoyés par WeeChat et les extensions :
| Signal SIGWINCH reçu (le terminal a été redimensionné).
| weechat | [[hook_signal_upgrade]] upgrade |
-| Chaîne : "quit" si le paramètre "-quit" a été donné pour /upgrade, sinon NULL.
+| Chaîne : "quit" si le paramètre "-quit" a été donné pour /upgrade, "-save"
+ si le paramètre "-save" a été donné pour /upgrade, sinon NULL.
| La commande `/upgrade` a été exécutée par l'utilisateur.
| weechat | [[hook_signal_upgrade_ended]] upgrade_ended | 0.3.4
diff --git a/doc/it/includes/autogen_user_commands.it.adoc b/doc/it/includes/autogen_user_commands.it.adoc
index f6f0d2564..c278d755f 100644
--- a/doc/it/includes/autogen_user_commands.it.adoc
+++ b/doc/it/includes/autogen_user_commands.it.adoc
@@ -2122,19 +2122,22 @@ Examples:
----
[[command_weechat_upgrade]]
-* `+upgrade+`: reload the WeeChat binary without disconnecting from servers
+* `+upgrade+`: save WeeChat session and reload the WeeChat binary without disconnecting from servers
----
-/upgrade [-yes] [<path_to_binary>|-quit]
+/upgrade [-yes] [<path_to_binary>|-save|-quit]
-yes: required if option "weechat.look.confirm_upgrade" is enabled
path_to_binary: path to WeeChat binary (default is current binary)
-dummy: do nothing (option used to prevent accidental completion with "-quit")
+ -save: only save the session, do not quit nor reload WeeChat; the configuration files are not saved (if needed you can use /save before this command)
-quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
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.
-Note: SSL connections are lost during upgrade, because reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
+Note: SSL connections are lost during upgrade (except with -save), because the reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
+
+Important: use of option -save can be dangerous, it is recommended to use only /upgrade (or with -quit) for a standard upgrade and a restart; the option -save can be used to save the session regularly and restore it in case of after abnormal exit (power outage, crash, etc.)
Upgrade process has 4 steps:
1. save session into files for core and plugins (buffers, history, ..)
@@ -2142,14 +2145,18 @@ Upgrade process has 4 steps:
3. save WeeChat configuration (weechat.conf)
4. execute new WeeChat binary and reload session.
-With option "-quit", the process is slightly different:
+With option "-quit", the process is:
1. close *ALL* connections (irc, xfer, relay, ...)
2. save session into files (*.upgrade)
3. unload all plugins
4. save WeeChat configuration
5. quit WeeChat
-Then later you can restore session with command: weechat --upgrade
-IMPORTANT: you must restore the session with exactly same configuration (files *.conf).
+
+With option "-save", the process is:
+ 1. save session into files (*.upgrade) with a disconnected state for IRC servers and Relay clients (but no disconnection is made)
+
+With -quit or -save, you can restore the session later with this command: weechat --upgrade
+IMPORTANT: you must restore the session with exactly same configuration (files *.conf) and if possible the same WeeChat version (or a more recent one).
It is possible to restore WeeChat session on another machine if you copy the content of WeeChat home directories (see /debug dirs).
----
@@ -3193,6 +3200,8 @@ Examples (you can also look at default triggers with /trigger listdefault):
/trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist"
silently save config each hour:
/trigger add cfgsave timer 3600000;0;0 "" "" "/mute /save"
+ silently save WeeChat session at midnight (see /help upgrade):
+ /trigger add session_save signal day_changed "" "" "/mute /upgrade -save"
open trigger monitor and show only modifiers and triggers whose name starts with "resize":
/trigger monitor @modifier,resize*
----
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 5f939470c..c0d0d81c6 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -11329,7 +11329,8 @@ List of signals sent by WeeChat and plugins:
// TRANSLATION MISSING
| weechat | [[hook_signal_upgrade]] upgrade |
-| String: "quit" if "-quit" argument was given for /upgrade, otherwise NULL.
+| String: "quit" if "-quit" argument was given for /upgrade, "save" if "-save"
+ if "-save" argument was given for /upgrade, otherwise NULL.
| Comando `/upgrade` digitato dall'utente.
| weechat | [[hook_signal_upgrade_ended]] upgrade_ended | 0.3.4
diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc
index db5e8f115..2638097c4 100644
--- a/doc/ja/includes/autogen_user_commands.ja.adoc
+++ b/doc/ja/includes/autogen_user_commands.ja.adoc
@@ -2122,19 +2122,22 @@ option: オプションの名前
----
[[command_weechat_upgrade]]
-* `+upgrade+`: サーバとの接続を維持して WeeChat 実行バイナリを再読込
+* `+upgrade+`: save WeeChat session and reload the WeeChat binary without disconnecting from servers
----
-/upgrade [-yes] [<path_to_binary>|-quit]
+/upgrade [-yes] [<path_to_binary>|-save|-quit]
-yes: required if option "weechat.look.confirm_upgrade" is enabled
path_to_binary: path to WeeChat binary (default is current binary)
-dummy: do nothing (option used to prevent accidental completion with "-quit")
+ -save: only save the session, do not quit nor reload WeeChat; the configuration files are not saved (if needed you can use /save before this command)
-quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
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.
-Note: SSL connections are lost during upgrade, because reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
+Note: SSL connections are lost during upgrade (except with -save), because the reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
+
+Important: use of option -save can be dangerous, it is recommended to use only /upgrade (or with -quit) for a standard upgrade and a restart; the option -save can be used to save the session regularly and restore it in case of after abnormal exit (power outage, crash, etc.)
Upgrade process has 4 steps:
1. save session into files for core and plugins (buffers, history, ..)
@@ -2142,14 +2145,18 @@ Upgrade process has 4 steps:
3. save WeeChat configuration (weechat.conf)
4. execute new WeeChat binary and reload session.
-With option "-quit", the process is slightly different:
+With option "-quit", the process is:
1. close *ALL* connections (irc, xfer, relay, ...)
2. save session into files (*.upgrade)
3. unload all plugins
4. save WeeChat configuration
5. quit WeeChat
-Then later you can restore session with command: weechat --upgrade
-IMPORTANT: you must restore the session with exactly same configuration (files *.conf).
+
+With option "-save", the process is:
+ 1. save session into files (*.upgrade) with a disconnected state for IRC servers and Relay clients (but no disconnection is made)
+
+With -quit or -save, you can restore the session later with this command: weechat --upgrade
+IMPORTANT: you must restore the session with exactly same configuration (files *.conf) and if possible the same WeeChat version (or a more recent one).
It is possible to restore WeeChat session on another machine if you copy the content of WeeChat home directories (see /debug dirs).
----
@@ -3193,6 +3200,8 @@ Examples (you can also look at default triggers with /trigger listdefault):
/trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist"
silently save config each hour:
/trigger add cfgsave timer 3600000;0;0 "" "" "/mute /save"
+ silently save WeeChat session at midnight (see /help upgrade):
+ /trigger add session_save signal day_changed "" "" "/mute /upgrade -save"
open trigger monitor and show only modifiers and triggers whose name starts with "resize":
/trigger monitor @modifier,resize*
----
diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc
index 7759e2cc0..fd075655a 100644
--- a/doc/ja/weechat_plugin_api.ja.adoc
+++ b/doc/ja/weechat_plugin_api.ja.adoc
@@ -10947,8 +10947,10 @@ WeeChat とプラグインが送信するシグナルのリスト:
| -
| SIGWINCH シグナルを受信しました (端末サイズが変更されました)
+// TRANSLATION MISSING
| weechat | [[hook_signal_upgrade]] upgrade |
-| String: /upgrade に "-quit" 引数が与えられた場合は "quit"、それ以外は NULL
+| String: "quit" if "-quit" argument was given for /upgrade, "save" if "-save"
+ if "-save" argument was given for /upgrade, otherwise NULL.
| ユーザがコマンド `/upgrade` を実行
| weechat | [[hook_signal_upgrade_ended]] upgrade_ended | 0.3.4
diff --git a/doc/pl/includes/autogen_user_commands.pl.adoc b/doc/pl/includes/autogen_user_commands.pl.adoc
index cc0d3867c..ae57e473c 100644
--- a/doc/pl/includes/autogen_user_commands.pl.adoc
+++ b/doc/pl/includes/autogen_user_commands.pl.adoc
@@ -2121,35 +2121,42 @@ Przykłady:
----
[[command_weechat_upgrade]]
-* `+upgrade+`: przeładowanie pliku binarnego WeeChat bez rozłączania z serwerami
+* `+upgrade+`: save WeeChat session and reload the WeeChat binary without disconnecting from servers
----
-/upgrade [-yes] [<ścieżka_do_binarki>|-quit]
+/upgrade [-yes] [<path_to_binary>|-save|-quit]
- -yes: wymagane, jeśli "weechat.look.confirm_upgrade" jest włączona
-ścieżka_do_binarki: ścieżka do pliku binarnego WeeChat (domyślnie jest to obecny plik)
- -dummy: nic nie rób (opcja użyta w celu zapobiegnięcia przypadkowego dopełnienia za pomocą"-quit")
- -quit: zamyka *WSZYSTKIE* połączenia, zapisuje sesję i wyłącza WeeChat, umożliwia to późniejsze przywrócenie (zobacz niżej)
+ -yes: required if option "weechat.look.confirm_upgrade" is enabled
+path_to_binary: path to WeeChat binary (default is current binary)
+ -dummy: do nothing (option used to prevent accidental completion with "-quit")
+ -save: only save the session, do not quit nor reload WeeChat; the configuration files are not saved (if needed you can use /save before this command)
+ -quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
-Ta komenda uaktualnia i przeładowuje działającą sesję WeeChat. Nowy plik binarny WeeChat powinien zostać skompilowany lub zainstalowany za pomocą managera pakietów przed uruchomieniem tej komendy.
+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.
-Uwaga: połączenia SSL są przerywane podczas uaktualniania, ponieważ przeładowanie sesji SSL nie jest obecnie możliwe za pomocą GnuTLS. Po uaktualnieniu nastąpi ponowne ich połączenie.
+Note: SSL connections are lost during upgrade (except with -save), because the reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
-Proces uaktualnienia składa się z 4 kroków:
- 1. zapisania sesji do plików dla rdzenia i wtyczek (bufory, historia, ..)
- 2. wyładowanie wszystkich wtyczek (zapisanie plików konfiguracyjnych *.conf)
- 3. zapisanie konfiguracji WeeChat (weechat.conf)
- 4. uruchomienie nowego pliku binarnego WeeChat i przeładowanie sesji.
+Important: use of option -save can be dangerous, it is recommended to use only /upgrade (or with -quit) for a standard upgrade and a restart; the option -save can be used to save the session regularly and restore it in case of after abnormal exit (power outage, crash, etc.)
-Z opcją "-quit", proces przebiega inaczej:
- 1. zamknięcie *WSZYSTKICH* połączeń (irc, xfer, relay, ...)
- 2. zapisanie sesji do pliku (*.upgrade)
- 3. wyładowanie wszystkich wtyczek
- 4. zapisanie konfiguracji WeeChat
- 5. wyłączenie WeeChat
-Następnie można przywrócić sesję za pomocą komendy: weechat --upgrade
-WAŻNE: należy przywracać sesję z identyczną konfiguracją (pliki *.conf).
-Jest możliwe przywrócenie sesji WeeChat na innej maszynie, jeśli skopiujemy zawartość katalogów domowych WeeChat (zobacz /debug dirs).
+Upgrade process has 4 steps:
+ 1. save session into files for core and plugins (buffers, history, ..)
+ 2. unload all plugins (configuration files (*.conf) are written on disk)
+ 3. save WeeChat configuration (weechat.conf)
+ 4. execute new WeeChat binary and reload session.
+
+With option "-quit", the process is:
+ 1. close *ALL* connections (irc, xfer, relay, ...)
+ 2. save session into files (*.upgrade)
+ 3. unload all plugins
+ 4. save WeeChat configuration
+ 5. quit WeeChat
+
+With option "-save", the process is:
+ 1. save session into files (*.upgrade) with a disconnected state for IRC servers and Relay clients (but no disconnection is made)
+
+With -quit or -save, you can restore the session later with this command: weechat --upgrade
+IMPORTANT: you must restore the session with exactly same configuration (files *.conf) and if possible the same WeeChat version (or a more recent one).
+It is possible to restore WeeChat session on another machine if you copy the content of WeeChat home directories (see /debug dirs).
----
[[command_weechat_uptime]]
@@ -3129,70 +3136,72 @@ Bez argumentów ta komenda wyświetli wszystkie załadowane wtyczki.
default -yes
monitor [<filtr>]
- list: lista triggerów (jeśli nie podano argumentu, wyświetli się ta lista)
- listfull: lista triggerów ze szczegółowymi informacjami
-listdefault: lista domyślnych triggerów
- add: dodaje trigger
- addoff: dodaje trigger (wyłączony)
- addreplace: dodaje lub zastępuje istniejący trigger
- nazwa: nazwa triggera
+ list: list triggers (without argument, this list is displayed)
+ listfull: list triggers with detailed info for each trigger
+listdefault: list default triggers
+ add: add a trigger
+ addoff: add a trigger (disabled)
+ addreplace: add or replace an existing trigger
+ name: name of trigger
hook: signal, hsignal, modifier, line, print, command, command_run, timer, config, focus, info, info_hashtable
- argumenty: argumenty dla uchwytu, w zależności od jego typu (oddzielone średnikami):
- signal: nazwa(-y) signal (wymagane)
- hsignal: nazwa(-y) hsignal (wymagane)
- modifier: nazwa(-y) modifier (wymagane)
- line: typ bufora("formatted", "free" lub "*"), lista mask buforów, tagi
- print: bufor, tagi, wiadomość, pomiń kolory
- command: komenda (wymagane), opis, argumenty, opis argumentów, dopełnienie (wszystkie argumenty poza komendą są przetwarzane, "${tg_trigger_name}" jest zastępowane przez nazwę triggera, zobacz /help eval)
- command_run: komenda(-y) (wymagane)
- timer: interwał (wymagane), wyrównanie sekund, ilość wywołań
- config: nazwa(-y) opcji (wymagane)
- focus: nazwa(-y) obszarów (wymagane)
- info: nazwa(y) informacji (wymagane)
- info_hashtable: nazwa(y) informacji (wymagane)
- warunki: przetwarzane warunki dla triggera
- regex: jedno lub więcej wyrażeń regularnych do zastępowania ciągów w zmiennych
- komenda: komenda do wykonania (wiele komend można oddzielić ";")
-zwracany_kod: kod zwracany w callbacku (ok (domyślne), ok_eat, error)
-post_action: akcja do wykonania po zakończeniu (none (domyślne), disable, delete)
- addinput: ustawia wejście z domyślnymi argumentami do stworzenia triggera
- input: ustawia wejście z komendą użytą do stworzenia triggera
- output: wysyła komendę do stworzenia triggera do buforu
- recreate: tak samo jak "input", z opcją "addreplace" zamiast "add"
- set: ustawia opcje triggera
- opcja: nazwa opcji: name, hook, arguments, conditions, regex, command, return_code
- (aby uzyskać pomoc na temat opcji możesz wpisać: /help trigger.trigger.<nazwa>.<opcja>)
- wartość: nowa wartość dla opcji
- rename: zmienia nazwę triggera
- copy: kopiuje trigger
- enable: włącza trigger(y) (bez argumentów: włącza triggery globalnie)
- disable: wyłącza trigger(y) (bez argumentów: wyłącza triggery globalnie)
- toggle: zmienia stan triggera(-ów) (bez argumentów: zmienia stan triggerów globalnie)
- restart: restartuje trigger(y) (tworzy na nowo uchwyty)
- show: pokazuje szczegółowe informacje o triggerze (z niektórymi statystykami)
- del: usuwa trigger
- -all: wykonaj akcję na wszystkich triggerach
- restore: przywraca trigger(y) z domyślnymi wartościami (działa tylko dla domyślnych triggerów)
- default: przywraca domyślne triggery
- monitor: otwiera bufor monitorowania triggerów, z opcjonalnym filtrem:
- filtr: filtruje uchwyty/triggery do wyświetlenia (uchwyt musi się zaczynać od "@", na przykład "@signal"), wiele filtrów może być oddzielonych przecinkiem; dzika karta "*" jest dozwolona w nazwie każdego triggera
-
-Kiedy callback triggera jest wywoływany, wykonywane są następujące akcje, w kolejności:
- 1. sprawdzenie warunków; jeśli nie są spełnione, wyjście
- 2. zastąpienie tekstu za pomocą rozszerzonych wyrażeń regularnych POSIX (jeśli zdefiniowane)
- 3. wykonanie komend(y) (jeśli zdefiniowane)
- 4. wyjście z kodem wyjścia (poza modifiers i focus)
- 5. wykonanie akcji kończącej
-
-Przykłady (możesz też spojrzeć na domyślne triggery za pomocą /trigger listdefault):
- dodaje atrybuty tekstu *bold*, _underline_ i /italic/ (tylko w wiadomościach użytkowników):
+ arguments: arguments for the hook, depending on hook (separated by semicolons):
+ signal: name(s) of signal (required)
+ hsignal: name(s) of hsignal (required)
+ modifier: name(s) of modifier (required)
+ line: buffer type ("formatted", "free" or "*"), list of buffer masks, tags
+ print: buffer, tags, message, strip colors
+ 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)
+ command_run: command(s) (required)
+ timer: interval (required), align on second, max calls
+ config: name(s) of option (required)
+ focus: name(s) of area (required)
+ info: name(s) of info (required)
+ info_hashtable: name(s) of info (required)
+ conditions: evaluated conditions for the trigger
+ regex: one or more regular expressions to replace strings in variables
+ command: command to execute (many commands can be separated by ";")
+return_code: return code in callback (ok (default), ok_eat, error)
+post_action: action to take after execution (none (default), disable, delete)
+ addinput: set input with default arguments to create a trigger
+ input: set input with the command used to create the trigger
+ output: send the command to create the trigger on the buffer
+ recreate: same as "input", with option "addreplace" instead of "add"
+ set: set an option in a trigger
+ option: name of option: name, hook, arguments, conditions, regex, command, return_code
+ (for help on option, you can type: /help trigger.trigger.<name>.<option>)
+ value: new value for the option
+ rename: rename a trigger
+ copy: copy a trigger
+ enable: enable trigger(s) (without arguments: enable triggers globally)
+ disable: disable trigger(s) (without arguments: disable triggers globally)
+ toggle: toggle trigger(s) (without arguments: toggle triggers globally)
+ restart: restart trigger(s) (recreate the hooks)
+ show: show detailed info on a trigger (with some stats)
+ del: delete a trigger
+ -all: do action on all triggers
+ restore: restore trigger(s) with the default values (works only for default triggers)
+ default: delete all triggers and restore default ones
+ monitor: open the trigger monitor buffer, with optional filter:
+ 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
+
+When a trigger callback is called, following actions are performed, in this order:
+ 1. check conditions; if false, exit
+ 2. replace text using POSIX extended regular expression(s) (if defined in trigger)
+ 3. execute command(s) (if defined in trigger)
+ 4. exit with a return code (except for modifier, line, focus, info and info_hashtable)
+ 5. perform post action
+
+Examples (you can also look at default triggers with /trigger listdefault):
+ add text attributes *bold*, _underline_ and /italic/ (only in user messages):
/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}/"
- ukrywa pasek z nickami na małych terminalach:
+ hide nicklist bar on small terminals:
/trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist"
/trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist"
- cichy zapis plików konfiguracyjnych co każdą godzinę:
+ silently save config each hour:
/trigger add cfgsave timer 3600000;0;0 "" "" "/mute /save"
- otwiera monitor triggerów i pokazuje tylko modifiers i triggery, których nazwa zaczyna się od "resize":
+ silently save WeeChat session at midnight (see /help upgrade):
+ /trigger add session_save signal day_changed "" "" "/mute /upgrade -save"
+ open trigger monitor and show only modifiers and triggers whose name starts with "resize":
/trigger monitor @modifier,resize*
----
// end::trigger_commands[]
diff --git a/doc/sr/includes/autogen_user_commands.sr.adoc b/doc/sr/includes/autogen_user_commands.sr.adoc
index 8f6844d5e..a79b07309 100644
--- a/doc/sr/includes/autogen_user_commands.sr.adoc
+++ b/doc/sr/includes/autogen_user_commands.sr.adoc
@@ -2122,35 +2122,42 @@ passphrase: измена тајне реченице (без passphrase, под
----
[[command_weechat_upgrade]]
-* `+upgrade+`: поновно учитавање WeeChat бинарног фајла без прекидања конекције са серверима
+* `+upgrade+`: save WeeChat session and reload the WeeChat binary without disconnecting from servers
----
-/upgrade [-yes] [<путања_до_бинарног>|-quit]
+/upgrade [-yes] [<path_to_binary>|-save|-quit]
- -yes: обавезно ако је укључена опција „weechat.look.confirm_upgrade”
-путања_до_бинарног: путања до WeeChat бинарног фајла (подразумевано је текући бинарни фајл)
- -dummy: не ради ништа (опција која се користи за спречавање нехотичног довршавања са „-quit”)
- -quit: затвара *СВЕ* конекције, чува сесију и напушта програм WeeChat, чиме се омогућава закашњена рестаурација (погледајте испод)
+ -yes: required if option "weechat.look.confirm_upgrade" is enabled
+path_to_binary: path to WeeChat binary (default is current binary)
+ -dummy: do nothing (option used to prevent accidental completion with "-quit")
+ -save: only save the session, do not quit nor reload WeeChat; the configuration files are not saved (if needed you can use /save before this command)
+ -quit: close *ALL* connections, save session and quit WeeChat, which makes possible a delayed restoration (see below)
-Ова команда ажурира и поновно учитава WeeChat сесију која се извршава. Нови WeeChat бинарни фајл мора бити компајлиран или инсталиран менаџером пакета пре покретања ове команде.
+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.
-Напомена: SSL конекције се губе током ажурирања, јер тренутно са GnuTLS није могуће поновно учитавање SSL сесија. Постоји аутоматско поновно успостављање конекције након ажурирања.
+Note: SSL connections are lost during upgrade (except with -save), because the reload of SSL sessions is currently not possible with GnuTLS. There is automatic reconnection after upgrade.
-Процес ажурирања има 4 корака:
- 1. чување сесије у фајлове за језгро и додатке (бафери, историја, ..)
- 2. уклањање свих додатака из меморије (конфигурациони фајлови (*.conf) се уписују на диск)
- 3. чување WeeChat конфигурације (weechat.conf)
- 4. извршавање новог WeeChat бинарног фајла и поновно учитавање сесије.
+Important: use of option -save can be dangerous, it is recommended to use only /upgrade (or with -quit) for a standard upgrade and a restart; the option -save can be used to save the session regularly and restore it in case of after abnormal exit (power outage, crash, etc.)
-Са опцијом „-quit”, процес је малко другачији:
- 1. затварање *СВИХ* конекција (irc, xfer, relay, ...)
- 2. чување сесије у фајлове (*.upgrade)
- 3. уклањање свих додатака из меморије
- 4. чување WeeChat конфигурације
- 5. напуштање програма WeeChat
-Затим касније можете да обновите сесију командом: weechat --upgrade
-ВАЖНО: сесију морате да обновите са потпуно истом конфигурацијом (фајлови *.conf).
-WeeChat сесија може да се обнови на другој машини ако копирате садржај WeeChat почетних директоријума (погледајте /debug dirs).
+Upgrade process has 4 steps:
+ 1. save session into files for core and plugins (buffers, history, ..)
+ 2. unload all plugins (configuration files (*.conf) are written on disk)
+ 3. save WeeChat configuration (weechat.conf)
+ 4. execute new WeeChat binary and reload session.
+
+With option "-quit", the process is:
+ 1. close *ALL* connections (irc, xfer, relay, ...)
+ 2. save session into files (*.upgrade)
+ 3. unload all plugins
+ 4. save WeeChat configuration
+ 5. quit WeeChat
+
+With option "-save", the process is:
+ 1. save session into files (*.upgrade) with a disconnected state for IRC servers and Relay clients (but no disconnection is made)
+
+With -quit or -save, you can restore the session later with this command: weechat --upgrade
+IMPORTANT: you must restore the session with exactly same configuration (files *.conf) and if possible the same WeeChat version (or a more recent one).
+It is possible to restore WeeChat session on another machine if you copy the content of WeeChat home directories (see /debug dirs).
----
[[command_weechat_uptime]]
@@ -3130,70 +3137,72 @@ autoload: учитавање свих скрипти из „autoload” дир
default -yes
monitor [<филтер>]
- list: листа окидача (без аргумента се приказује ова листа)
- listfull: листа окидача са детаљним инфо о сваком окидачу
-listdefault: листа подразумеваних окидача
- add: додавање окидача
- addoff: додавање окидача (искљученог)
- addreplace: додавање или замена постојећег окидача
- име: име окидача
- кука: signal, hsignal, modifier, line, print, command, command_run, timer, config, focus, info, info_hashtable
- аргументи: аргументи за куку, у зависности од куке (раздвојени тачка запетама):
- signal: име(на) signal-а (обавезно)
- hsignal: име(на) hsignal-а (обавезно)
- modifier: име(на) modifier-а (обавезно)
- line: тип бафера („formatted”, „free” или „*”), листа маски бафера, ознака
- print: бафер, ознаке, порука, уклањање боја
- command: команда (обавезна), опис, аргументи, опис аргумената, довршавање (сви аргументи осим command се израчунавају, „${tg_trigger_name}” се замењује именом окидача, погледајте /help eval)
- command_run: команд(а/е) (обавезно)
- timer: интервал (обавезан), поравнање на секунди, макс позива
- config: име(на) опције (обавезно)
- focus: име(на) површине (обавезно)
- info: име(на) информације (обавезно)
- info_hashtable: име(на) информације (обавезно)
- услови: израчунати услови за окидач
- регизраз: један или више регуларних израза за замену стрингова у променљивама
- команда: команда која треба да се изврши (више команди може да се раздвоји са „;”)
- повр_кôд: повратни кôд у функцији повратног позива (ok (подраз), ok_eat, error)
-пост_акција: акција која се покреће након извршавања (none (подраз), disable, delete)
- addinput: постављање улаза на подразумеване аргументе да се креира окидач
- input: постављање улаза на команду која је употребљена за креирање окидача
- output: слање команде за креирање окидача у бафер
- recreate: исто као „input”, са опцијом „addreplace” уместо „add”
- set: постављање опције у окидачу
- опција: име опције: name, hook, arguments, conditions, regex, command, return_code
- (за помоћ у вези опције, можете да откуцате: /help trigger.trigger.<име>.<опција>)
- вредност: нова вредност опције
- rename: промена имена окидача
- copy: копирање окидача
- enable: укључивање окидача (без аргумената: окидачи се укључују глобално)
- disable: искључивање окидача (без аргумената: окидачи се искључују глобално)
- toggle: пребацивање окидача (без аргумената: окидачи се пребацују глобално)
- restart: поновно покретање окидача (куке се поново креирају)
- show: приказ детаљних информација о окидачу (са мало статистике)
- del: брисање окидача
- -all: извршавање акције над свим окидачима
- restore: обнављање окидача са подразумеваним вредностима (функционише само за подразумеване окидаче)
- default: брисање свих окидача и обнављање подразумеваних
- monitor: отварање бафера за праћење окидача, са необавезним филтером:
- филтер: филтрирање кука/окидача који се приказују (кука мора да почиње са „@”, на пример „@signal”), више филтера може да се раздвоји запетама; дозвољен је џокер „*” у сваком имену окидача
-
-Када се позове функција повратног позива окидача, извршавају се следеће акције, у наведеном редоследу:
- 1. провера услова; ако је нетачно, напушта се
- 2. замена текста употребом POSIX проширених регуларних израза (ако су дефинисани у окидачу)
- 3. извршавање команд(е/и) (ако су дефинисане у окидачу)
- 4. излазак са повратним кодом (осим за modifier, line, focus, info и info_hashtable)
- 5. извршавање пост акције
-
-Примери (такође можете да погледате садржај подразумеваних окидача са /trigger listdefault):
- додавање текст атрибута *подебљано*, _подвучено и /курзив/ (само у корисничким порукама):
- /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}/"
- сакривање траке листе надимака на малим терминалима:
+ list: list triggers (without argument, this list is displayed)
+ listfull: list triggers with detailed info for each trigger
+listdefault: list default triggers
+ add: add a trigger
+ addoff: add a trigger (disabled)
+ addreplace: add or replace an existing trigger
+ name: name of trigger
+ hook: signal, hsignal, modifier, line, print, command, command_run, timer, config, focus, info, info_hashtable
+ arguments: arguments for the hook, depending on hook (separated by semicolons):
+ signal: name(s) of signal (required)
+ hsignal: name(s) of hsignal (required)
+ modifier: name(s) of modifier (required)
+ line: buffer type ("formatted", "free" or "*"), list of buffer masks, tags
+ print: buffer, tags, message, strip colors
+ 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)
+ command_run: command(s) (required)
+ timer: interval (required), align on second, max calls
+ config: name(s) of option (required)
+ focus: name(s) of area (required)
+ info: name(s) of info (required)
+ info_hashtable: name(s) of info (required)
+ conditions: evaluated conditions for the trigger
+ regex: one or more regular expressions to replace strings in variables
+ command: command to execute (many commands can be separated by ";")
+return_code: return code in callback (ok (default), ok_eat, error)
+post_action: action to take after execution (none (default), disable, delete)
+ addinput: set input with default arguments to create a trigger
+ input: set input with the command used to create the trigger
+ output: send the command to create the trigger on the buffer
+ recreate: same as "input", with option "addreplace" instead of "add"
+ set: set an option in a trigger
+ option: name of option: name, hook, arguments, conditions, regex, command, return_code
+ (for help on option, you can type: /help trigger.trigger.<name>.<option>)
+ value: new value for the option
+ rename: rename a trigger
+ copy: copy a trigger
+ enable: enable trigger(s) (without arguments: enable triggers globally)
+ disable: disable trigger(s) (without arguments: disable triggers globally)
+ toggle: toggle trigger(s) (without arguments: toggle triggers globally)
+ restart: restart trigger(s) (recreate the hooks)
+ show: show detailed info on a trigger (with some stats)
+ del: delete a trigger
+ -all: do action on all triggers
+ restore: restore trigger(s) with the default values (works only for default triggers)
+ default: delete all triggers and restore default ones
+ monitor: open the trigger monitor buffer, with optional filter:
+ 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
+
+When a trigger callback is called, following actions are performed, in this order:
+ 1. check conditions; if false, exit
+ 2. replace text using POSIX extended regular expression(s) (if defined in trigger)
+ 3. execute command(s) (if defined in trigger)
+ 4. exit with a return code (except for modifier, line, focus, info and info_hashtable)
+ 5. perform post action
+
+Examples (you can also look at default triggers with /trigger listdefault):
+ add text attributes *bold*, _underline_ and /italic/ (only in user messages):
+ /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}/"
+ hide nicklist bar on small terminals:
/trigger add resize_small signal signal_sigwinch "${info:term_width} < 100" "" "/bar hide nicklist"
/trigger add resize_big signal signal_sigwinch "${info:term_width} >= 100" "" "/bar show nicklist"
- чување конфигурације на сваки сат, у тишини:
+ silently save config each hour:
/trigger add cfgsave timer 3600000;0;0 "" "" "/mute /save"
- отварање монитора окидача и приказ само модификатора и окидача чије име почиње са „resize”:
+ silently save WeeChat session at midnight (see /help upgrade):
+ /trigger add session_save signal day_changed "" "" "/mute /upgrade -save"
+ open trigger monitor and show only modifiers and triggers whose name starts with "resize":
/trigger monitor @modifier,resize*
----
// end::trigger_commands[]
diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc
index 903da2019..61d87977c 100644
--- a/doc/sr/weechat_plugin_api.sr.adoc
+++ b/doc/sr/weechat_plugin_api.sr.adoc
@@ -10527,8 +10527,10 @@ struct t_hook *weechat_hook_signal (const char *signal,
| - |
Примљен је сигнал SIGWINCH (промењена је величина терминала).
+// TRANSLATION MISSING
| weechat | [[hook_signal_upgrade]] upgrade |
-| Стринг: "quit" ако је за /upgrade наведен аргумент „-quit”, у супротном NULL.
+| String: "quit" if "-quit" argument was given for /upgrade, "save" if "-save"
+ if "-save" argument was given for /upgrade, otherwise NULL.
| Корисник је задао команду `/upgrade`.
| weechat | [[hook_signal_upgrade_ended]] upgrade_ended | 0.3.4