summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--doc/de/includes/autogen_api_completions.de.adoc4
-rw-r--r--doc/de/includes/autogen_user_commands.de.adoc94
-rw-r--r--doc/de/weechat_scripting.de.adoc2
-rw-r--r--doc/de/weechat_user.de.adoc2
-rw-r--r--doc/en/includes/autogen_api_completions.en.adoc4
-rw-r--r--doc/en/includes/autogen_user_commands.en.adoc12
-rw-r--r--doc/en/weechat_scripting.en.adoc2
-rw-r--r--doc/en/weechat_user.en.adoc2
-rw-r--r--doc/fr/includes/autogen_api_completions.fr.adoc4
-rw-r--r--doc/fr/includes/autogen_user_commands.fr.adoc10
-rw-r--r--doc/fr/weechat_scripting.fr.adoc2
-rw-r--r--doc/fr/weechat_user.fr.adoc2
-rw-r--r--doc/it/includes/autogen_api_completions.it.adoc4
-rw-r--r--doc/it/includes/autogen_user_commands.it.adoc12
-rw-r--r--doc/it/weechat_scripting.it.adoc2
-rw-r--r--doc/it/weechat_user.it.adoc2
-rw-r--r--doc/ja/includes/autogen_api_completions.ja.adoc4
-rw-r--r--doc/ja/includes/autogen_user_commands.ja.adoc12
-rw-r--r--doc/ja/weechat_scripting.ja.adoc2
-rw-r--r--doc/ja/weechat_user.ja.adoc2
-rw-r--r--doc/pl/includes/autogen_api_completions.pl.adoc4
-rw-r--r--doc/pl/includes/autogen_user_commands.pl.adoc12
-rw-r--r--doc/pl/weechat_scripting.pl.adoc2
-rw-r--r--doc/pl/weechat_user.pl.adoc2
-rw-r--r--po/cs.po23
-rw-r--r--po/de.po29
-rw-r--r--po/es.po23
-rw-r--r--po/fr.po34
-rw-r--r--po/hu.po23
-rw-r--r--po/it.po23
-rw-r--r--po/ja.po23
-rw-r--r--po/pl.po23
-rw-r--r--po/pt.po23
-rw-r--r--po/pt_BR.po23
-rw-r--r--po/ru.po23
-rw-r--r--po/tr.po21
-rw-r--r--po/weechat.pot21
-rw-r--r--src/core/wee-command.c53
-rw-r--r--src/core/wee-completion.c98
-rw-r--r--src/gui/gui-buffer.h5
-rw-r--r--src/plugins/alias/alias-command.c2
42 files changed, 502 insertions, 169 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 3a840e056..40408523d 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
New features::
+ * core: add options "setvar" and "delvar" in command /buffer, rename option "localvar" to "listvar"
* core: add buffer local variable "completion_default_template" (evaluated) to override the value of option "weechat.completion.default_template" (issue #1600)
* core: add option "recreate" in command /filter
* core: add evaluation of conditions in evaluation of expressions with "eval_cond:" (issue #1582)
diff --git a/doc/de/includes/autogen_api_completions.de.adoc b/doc/de/includes/autogen_api_completions.de.adoc
index b1e76cfdb..c4f71190d 100644
--- a/doc/de/includes/autogen_api_completions.de.adoc
+++ b/doc/de/includes/autogen_api_completions.de.adoc
@@ -120,6 +120,10 @@
| weechat | bars_options | Einstellungen für Infobars
+| weechat | buffer_local_variable_value | value of a buffer local variable
+
+| weechat | buffer_local_variables | buffer local variables
+
| weechat | buffer_properties_get | Eigenschaften die für den Buffer gelesen werden können
| weechat | buffer_properties_set | Eigenschaften die für den Buffer gesetzt werden können
diff --git a/doc/de/includes/autogen_user_commands.de.adoc b/doc/de/includes/autogen_user_commands.de.adoc
index 8a9fb750d..136acac17 100644
--- a/doc/de/includes/autogen_user_commands.de.adoc
+++ b/doc/de/includes/autogen_user_commands.de.adoc
@@ -1022,7 +1022,7 @@ Anmerkung: Im Befehl können Variablen genutzt werden, die dann durch den entspr
$n-m: Argumente von 'n' bis 'm'
$*: alle Argumente
$~: letztes Argument
- $var: "var" ist eine lokale Variable für den jeweiligen Buffer (siehe /buffer localvar)
+ $var: "var" ist eine lokale Variable für den jeweiligen Buffer (siehe /buffer listvar)
Beispiel: $nick, $channel, $server, $plugin, $name
Beispiele:
@@ -1115,67 +1115,71 @@ Beispiele:
renumber [<number1> [<number2> [<start>]]]
close [<n1>[-<n2>]|<name>...]
notify [<level>]
- localvar [<number>|<name>]
+ listvar [<number>|<name>]
+ setvar <name> [<value>]
+ delvar <name>
set <property> [<value>]
get <property>
<number>|-|+|<name>
- list: alle geöffneten Buffer werden aufgelistet (ohne Angabe von Argumente wird diese Liste standardmäßig ausgegeben)
- add: öffnet einen neuen Buffer (dieser kann mit "/buffer close" oder "q" in der Eingabezeile, beendet werden)
- clear: leert den Inhalt des Buffers (entweder durch Angabe der entsprechenden Nummer des Buffers oder "-merged " für zusammengefügte Buffer oder "-all" für alle Buffer. Ohne Angabe eines Arguments wird der aktuelle Buffer gelöscht)
- move: Buffer in der Liste verschieben (kann auch relativ sein, z.B. -1); "-" = auf erste Position verschieben, "+" = auf letzte Position + 1 verschieben
- swap: tauscht zwei Buffer miteinander aus (bei Angabe von nur einem Buffer (Buffernummer/-name), wird der aktuelle Buffer mit dem angegebenen Buffer getauscht)
- cycle: springt in einer Schleife von einem Buffer zum nächsten, die in einer Liste angegeben werden
- merge: fügt den aktuellen Buffer mit einem anderen Buffer zusammen (bei einem Chat-Buffer werden zwei Buffer zusammengefügt
- (Bei der Standardtastenbelegung wird mittels "CTRL-x" zwischen zusammengefügten Buffern umgeschaltet)
- unmerge: trennt Buffer wieder voneinander, falls zwei Buffer die selbe Nummer teilen
- hide: versteckt einen Buffer
- unhide: macht Buffer wieder sichtbar
-renumber: Buffer werden umnummeriert (Einstellung weechat.look.buffer_auto_renumber muss deaktiviert sein)
- close: Buffer schließen (Nummer oder Bereich ist optional)
- notify: Benachrichtigungsstufe für den aktuellen Buffer anzeigen oder einstellen. Folgende Möglichkeiten bestimmen den Grad der Benachrichtigung und ob der Buffer in der Hotlist angezeigt wird:
- none: keine Benachrichtigung
- highlight: Benachrichtigung bei hervorgehobenen Nachrichten (Highlights)
- message: Benachrichtigung bei Nachrichten von Usern + Highlights
- all: Benachrichtigung bei allen Nachrichten
- reset: Benachrichtigung auf Standardwert zurück setzen (all)
-localvar: zeigt die lokalen Variablen für den aktuellen Buffer an
- set: setzt eine Eigenschaft für den aktuellen Buffer
- get: zeigt eine Eigenschaft für den aktuellen Buffer an
- number: wechselt von einem Buffer zu einem anderen, mögliche Optionen:
- '+': relativer Sprung um 'n'-Buffer
- '-': relativer Sprung, um 'n'-Buffer
- '*': wechselt zum Buffer mit der Nummer 'n'; nutzt die interne Einstellung "weechat.look.jump_current_to_previous_buffer"
- -: springt zum ersten Buffer
- +: springt zum letzten Buffer
- name: wechselt zum Buffer mit dem angegebenen Namen (Name muss nicht vollständig sein!)
+ list: list buffers (without argument, this list is displayed)
+ add: add a new buffer (it can be closed with "/buffer close" or input "q")
+ clear: clear buffer content (number for a buffer, -merged for merged buffers, -all for all buffers, or nothing for current buffer)
+ move: move buffer in the list (may be relative, for example -1); "-" = move to first buffer number, "+" = move to last buffer number + 1
+ swap: swap two buffers (swap with current buffer if only one number/name given)
+ cycle: jump loop between a list of buffers
+ merge: merge current buffer to another buffer (chat area will be mix of both buffers)
+ (by default ctrl-x switches between merged buffers)
+ unmerge: unmerge buffer from other buffers which have same number
+ hide: hide the buffer
+ unhide: unhide the buffer
+renumber: renumber buffers (works only if option weechat.look.buffer_auto_renumber is off)
+ close: close buffer (number/range or name is optional)
+ notify: display or set notify level for current buffer: this level determines whether buffer will be added to hotlist or not:
+ none: never
+ highlight: for highlights only
+ message: for messages from users + highlights
+ all: all messages
+ reset: reset to default value (all)
+ listvar: display local variables in a buffer
+ setvar: set a local variable in the current buffer
+ delvar: delete a local variable from the current buffer
+ set: set a property in the current buffer
+ get: display a property of current buffer
+ number: jump to buffer by number, possible prefix:
+ '+': relative jump, add number to current
+ '-': relative jump, sub number to current
+ '*': jump to number, using option "weechat.look.jump_current_to_previous_buffer"
+ -: jump to first buffer number
+ +: jump to last buffer number
+ name: jump to buffer by (partial) name
-Beispiele:
- leert den aktuellen Buffer:
+Examples:
+ clear current buffer:
/buffer clear
- verschiebt Buffer auf Position 5:
+ move buffer to number 5:
/buffer move 5
- tauscht Buffer 1 und 3:
+ swap buffer 1 with 3:
/buffer swap 1 3
- tauscht Buffer #weechat und den aktuellen Buffer:
+ swap buffer #weechat with current buffer:
/buffer swap #weechat
- springt in einer Schleife zu den Buffern #chan1, #chan2, #chan3:
+ jump on #chan1, #chan2, #chan3 and loop:
/buffer cycle #chan1 #chan2 #chan3
- verbindet Buffer mit dem Core-Buffer:
+ merge with core buffer:
/buffer merge 1
- verbindet Buffer mit #weechat buffer:
+ merge with #weechat buffer:
/buffer merge #weechat
- trennt Buffer voneinander:
+ unmerge buffer:
/buffer unmerge
- schließt aktuellen Buffer:
+ close current buffer:
/buffer close
- schließt Buffer 5 bis 7:
+ close buffers 5 to 7:
/buffer close 5-7
- springt zum Buffer: #weechat:
+ jump to #weechat:
/buffer #weechat
- springt zum nächsten Buffer:
+ jump to next buffer:
/buffer +1
- springt zum letzten Buffer:
+ jump to last buffer number:
/buffer +
----
diff --git a/doc/de/weechat_scripting.de.adoc b/doc/de/weechat_scripting.de.adoc
index 3f1921a21..c4ea922e7 100644
--- a/doc/de/weechat_scripting.de.adoc
+++ b/doc/de/weechat_scripting.de.adoc
@@ -988,7 +988,7 @@ Um zu sehen welche lokalen Variablen für einen Buffer gesetzt sind führen Sie
bitte in WeeChat folgenden Befehl aus:
----
-/buffer localvar
+/buffer listvar
----
[[hooks]]
diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc
index 44d97fa8e..20b65575c 100644
--- a/doc/de/weechat_user.de.adoc
+++ b/doc/de/weechat_user.de.adoc
@@ -3150,7 +3150,7 @@ mit lokalen Buffervariablen zu füllen. Um sich die verfügbaren lokalen Variabl
für den aktuellen Buffer anzeigen zu lassen:
----
-/buffer localvar
+/buffer listvar
----
Masken werden in absteigender Reihenfolge abgeglichen, beginnend mit
diff --git a/doc/en/includes/autogen_api_completions.en.adoc b/doc/en/includes/autogen_api_completions.en.adoc
index 4f325b36d..e62f09248 100644
--- a/doc/en/includes/autogen_api_completions.en.adoc
+++ b/doc/en/includes/autogen_api_completions.en.adoc
@@ -120,6 +120,10 @@
| weechat | bars_options | options for bars
+| weechat | buffer_local_variable_value | value of a buffer local variable
+
+| weechat | buffer_local_variables | buffer local variables
+
| weechat | buffer_properties_get | properties that can be read on a buffer
| weechat | buffer_properties_set | properties that can be set on a buffer
diff --git a/doc/en/includes/autogen_user_commands.en.adoc b/doc/en/includes/autogen_user_commands.en.adoc
index 05aac6a5e..4f9592027 100644
--- a/doc/en/includes/autogen_user_commands.en.adoc
+++ b/doc/en/includes/autogen_user_commands.en.adoc
@@ -1022,7 +1022,7 @@ Note: in command, special variables are replaced:
$n-m: arguments from 'n' to 'm'
$*: all arguments
$~: last argument
- $var: where "var" is a local variable of buffer (see /buffer localvar)
+ $var: where "var" is a local variable of buffer (see /buffer listvar)
examples: $nick, $channel, $server, $plugin, $name
Examples:
@@ -1115,7 +1115,9 @@ Examples:
renumber [<number1> [<number2> [<start>]]]
close [<n1>[-<n2>]|<name>...]
notify [<level>]
- localvar [<number>|<name>]
+ listvar [<number>|<name>]
+ setvar <name> [<value>]
+ delvar <name>
set <property> [<value>]
get <property>
<number>|-|+|<name>
@@ -1139,8 +1141,10 @@ renumber: renumber buffers (works only if option weechat.look.buffer_auto_renumb
message: for messages from users + highlights
all: all messages
reset: reset to default value (all)
-localvar: display local variables for the buffer
- set: set a property for current buffer
+ listvar: display local variables in a buffer
+ setvar: set a local variable in the current buffer
+ delvar: delete a local variable from the current buffer
+ set: set a property in the current buffer
get: display a property of current buffer
number: jump to buffer by number, possible prefix:
'+': relative jump, add number to current
diff --git a/doc/en/weechat_scripting.en.adoc b/doc/en/weechat_scripting.en.adoc
index a14fc1342..8d11ed376 100644
--- a/doc/en/weechat_scripting.en.adoc
+++ b/doc/en/weechat_scripting.en.adoc
@@ -965,7 +965,7 @@ weechat.buffer_set(buffer, "localvar_del_myvar", "")
To see local variables of a buffer, do this command in WeeChat:
----
-/buffer localvar
+/buffer listvar
----
[[hooks]]
diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc
index 98d9d5fcf..287ca7910 100644
--- a/doc/en/weechat_user.en.adoc
+++ b/doc/en/weechat_user.en.adoc
@@ -3087,7 +3087,7 @@ It is possible to define a filename mask for each buffer, and use local buffer
variables to build filename. To see available local variables for current buffer:
----
-/buffer localvar
+/buffer listvar
----
Masks will be matched on options in descending order of specificity on
diff --git a/doc/fr/includes/autogen_api_completions.fr.adoc b/doc/fr/includes/autogen_api_completions.fr.adoc
index af1638f00..4a8292ee4 100644
--- a/doc/fr/includes/autogen_api_completions.fr.adoc
+++ b/doc/fr/includes/autogen_api_completions.fr.adoc
@@ -120,6 +120,10 @@
| weechat | bars_options | options pour les barres
+| weechat | buffer_local_variable_value | valeur d'une variable locale du tampon
+
+| weechat | buffer_local_variables | variables locales du tampon
+
| weechat | buffer_properties_get | propriétés qui peuvent être lues sur un tampon
| weechat | buffer_properties_set | propriétés qui peuvent être changées sur un tampon
diff --git a/doc/fr/includes/autogen_user_commands.fr.adoc b/doc/fr/includes/autogen_user_commands.fr.adoc
index 0eeedbaca..08dfbbb91 100644
--- a/doc/fr/includes/autogen_user_commands.fr.adoc
+++ b/doc/fr/includes/autogen_user_commands.fr.adoc
@@ -1022,7 +1022,7 @@ Note : dans la commande, les variables spéciales sont remplacées :
$n-m : paramètres de 'n' à 'm'
$* : tous les paramètres
$~ : le dernier paramètre
- $var : où "var" est une variable locale du tampon (voir /buffer localvar)
+ $var : où "var" est une variable locale du tampon (voir /buffer listvar)
exemples : $nick, $channel, $server, $plugin, $name
Exemples :
@@ -1115,7 +1115,9 @@ Exemples :
renumber <nombre1> [<nombre2> [<départ>]]
close [<n1>[-<n2>]|<nom>...]
notify [<niveau>]
- localvar [<nombre>|<nom>]
+ listvar [<nombre>|<nom>]
+ setvar <nom> [<valeur>]
+ delvar <nom>
set <propriété> [<valeur>]
get <propriété>
<nombre>|<nom>
@@ -1139,7 +1141,9 @@ renumber : renuméroter des tampons (fonctionne seulement si l'option weechat.l
message : pour les messages d'utilisateurs + highlights
all : pour tous les messages
reset : réinitialise à valeur par défaut (all)
-localvar : afficher la liste des variables locales pour le tampon
+ listvar : afficher la liste des variables locales d'un tampon
+ setvar : modifier une variable locale du tampon courant
+ delvar : supprimer une variable locale du tampon courant
set : modifier une propriété du tampon courant
get : afficher une propriété du tampon courant
nombre : sauter au tampon qui a ce numéro, préfixe possible :
diff --git a/doc/fr/weechat_scripting.fr.adoc b/doc/fr/weechat_scripting.fr.adoc
index bb60b9acb..aceb25792 100644
--- a/doc/fr/weechat_scripting.fr.adoc
+++ b/doc/fr/weechat_scripting.fr.adoc
@@ -992,7 +992,7 @@ Pour voir les variables locales d'un tampon, exécutez cette commande dans
WeeChat :
----
-/buffer localvar
+/buffer listvar
----
[[hooks]]
diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc
index 90c868226..0a551bf56 100644
--- a/doc/fr/weechat_user.fr.adoc
+++ b/doc/fr/weechat_user.fr.adoc
@@ -3186,7 +3186,7 @@ d'utiliser les variables locales du tampon pour construire le nom de fichier.
Pour voir les variables disponibles sur le tampon courant :
----
-/buffer localvar
+/buffer listvar
----
Les masques seront utilisés par ordre de priorité descendante sur
diff --git a/doc/it/includes/autogen_api_completions.it.adoc b/doc/it/includes/autogen_api_completions.it.adoc
index 46342cb5d..9c04c899c 100644
--- a/doc/it/includes/autogen_api_completions.it.adoc
+++ b/doc/it/includes/autogen_api_completions.it.adoc
@@ -120,6 +120,10 @@
| weechat | bars_options | opzioni per le barre
+| weechat | buffer_local_variable_value | value of a buffer local variable
+
+| weechat | buffer_local_variables | buffer local variables
+
| weechat | buffer_properties_get | proprietà che possono essere lette su un buffer
| weechat | buffer_properties_set | proprietà che possono essere impostate su un buffer
diff --git a/doc/it/includes/autogen_user_commands.it.adoc b/doc/it/includes/autogen_user_commands.it.adoc
index b8bc653fc..9f2fe8a42 100644
--- a/doc/it/includes/autogen_user_commands.it.adoc
+++ b/doc/it/includes/autogen_user_commands.it.adoc
@@ -1022,7 +1022,7 @@ Note: in command, special variables are replaced:
$n-m: arguments from 'n' to 'm'
$*: all arguments
$~: last argument
- $var: where "var" is a local variable of buffer (see /buffer localvar)
+ $var: where "var" is a local variable of buffer (see /buffer listvar)
examples: $nick, $channel, $server, $plugin, $name
Examples:
@@ -1115,7 +1115,9 @@ Examples:
renumber [<number1> [<number2> [<start>]]]
close [<n1>[-<n2>]|<name>...]
notify [<level>]
- localvar [<number>|<name>]
+ listvar [<number>|<name>]
+ setvar <name> [<value>]
+ delvar <name>
set <property> [<value>]
get <property>
<number>|-|+|<name>
@@ -1139,8 +1141,10 @@ renumber: renumber buffers (works only if option weechat.look.buffer_auto_renumb
message: for messages from users + highlights
all: all messages
reset: reset to default value (all)
-localvar: display local variables for the buffer
- set: set a property for current buffer
+ listvar: display local variables in a buffer
+ setvar: set a local variable in the current buffer
+ delvar: delete a local variable from the current buffer
+ set: set a property in the current buffer
get: display a property of current buffer
number: jump to buffer by number, possible prefix:
'+': relative jump, add number to current
diff --git a/doc/it/weechat_scripting.it.adoc b/doc/it/weechat_scripting.it.adoc
index c00846811..94d7ef626 100644
--- a/doc/it/weechat_scripting.it.adoc
+++ b/doc/it/weechat_scripting.it.adoc
@@ -1004,7 +1004,7 @@ Per impostare le variabili locali di un buffer, digitare questo comando
in WeeChat:
----
-/buffer localvar
+/buffer listvar
----
[[hooks]]
diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc
index e9dfae0f5..3750be2b9 100644
--- a/doc/it/weechat_user.it.adoc
+++ b/doc/it/weechat_user.it.adoc
@@ -3330,7 +3330,7 @@ le variabili buffer locali per costruire il nome del file. To see available
local variables for current buffer:
----
-/buffer localvar
+/buffer listvar
----
// TRANSLATION MISSING
diff --git a/doc/ja/includes/autogen_api_completions.ja.adoc b/doc/ja/includes/autogen_api_completions.ja.adoc
index fd2d6661a..423e4d254 100644
--- a/doc/ja/includes/autogen_api_completions.ja.adoc
+++ b/doc/ja/includes/autogen_api_completions.ja.adoc
@@ -120,6 +120,10 @@
| weechat | bars_options | バーのオプション
+| weechat | buffer_local_variable_value | value of a buffer local variable
+
+| weechat | buffer_local_variables | buffer local variables
+
| weechat | buffer_properties_get | バッファから読み取り可能なプロパティ
| weechat | buffer_properties_set | バッファに指定可能なプロパティ
diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc
index 83eddefab..2e3d10317 100644
--- a/doc/ja/includes/autogen_user_commands.ja.adoc
+++ b/doc/ja/includes/autogen_user_commands.ja.adoc
@@ -1022,7 +1022,7 @@ Note: in command, special variables are replaced:
$n-m: arguments from 'n' to 'm'
$*: all arguments
$~: last argument
- $var: where "var" is a local variable of buffer (see /buffer localvar)
+ $var: where "var" is a local variable of buffer (see /buffer listvar)
examples: $nick, $channel, $server, $plugin, $name
Examples:
@@ -1115,7 +1115,9 @@ message: 離席メッセージ (メッセージが無い場合は、離席状態
renumber [<number1> [<number2> [<start>]]]
close [<n1>[-<n2>]|<name>...]
notify [<level>]
- localvar [<number>|<name>]
+ listvar [<number>|<name>]
+ setvar <name> [<value>]
+ delvar <name>
set <property> [<value>]
get <property>
<number>|-|+|<name>
@@ -1139,8 +1141,10 @@ renumber: renumber buffers (works only if option weechat.look.buffer_auto_renumb
message: for messages from users + highlights
all: all messages
reset: reset to default value (all)
-localvar: display local variables for the buffer
- set: set a property for current buffer
+ listvar: display local variables in a buffer
+ setvar: set a local variable in the current buffer
+ delvar: delete a local variable from the current buffer
+ set: set a property in the current buffer
get: display a property of current buffer
number: jump to buffer by number, possible prefix:
'+': relative jump, add number to current
diff --git a/doc/ja/weechat_scripting.ja.adoc b/doc/ja/weechat_scripting.ja.adoc
index feca5729f..55d940082 100644
--- a/doc/ja/weechat_scripting.ja.adoc
+++ b/doc/ja/weechat_scripting.ja.adoc
@@ -987,7 +987,7 @@ weechat.buffer_set(buffer, "localvar_del_myvar", "")
バッファに対するローカル変数を見るには、WeeChat で以下のコマンドを実行してください:
----
-/buffer localvar
+/buffer listvar
----
[[hooks]]
diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc
index 23f0104ff..80a7f698b 100644
--- a/doc/ja/weechat_user.ja.adoc
+++ b/doc/ja/weechat_user.ja.adoc
@@ -3129,7 +3129,7 @@ It is possible to define a filename mask for each buffer, and use local buffer
variables to build filename. To see available local variables for current buffer:
----
-/buffer localvar
+/buffer listvar
----
// TRANSLATION MISSING
diff --git a/doc/pl/includes/autogen_api_completions.pl.adoc b/doc/pl/includes/autogen_api_completions.pl.adoc
index b4fdd2933..17c706194 100644
--- a/doc/pl/includes/autogen_api_completions.pl.adoc
+++ b/doc/pl/includes/autogen_api_completions.pl.adoc
@@ -120,6 +120,10 @@
| weechat | bars_options | opcje pasków
+| weechat | buffer_local_variable_value | value of a buffer local variable
+
+| weechat | buffer_local_variables | buffer local variables
+
| weechat | buffer_properties_get | właściwości, jakie mogą być przeczytane w buforze
| weechat | buffer_properties_set | właściwości, jakie mogą być ustawione w buforze
diff --git a/doc/pl/includes/autogen_user_commands.pl.adoc b/doc/pl/includes/autogen_user_commands.pl.adoc
index c696816db..79c14a587 100644
--- a/doc/pl/includes/autogen_user_commands.pl.adoc
+++ b/doc/pl/includes/autogen_user_commands.pl.adoc
@@ -1021,7 +1021,7 @@ Note: in command, special variables are replaced:
$n-m: arguments from 'n' to 'm'
$*: all arguments
$~: last argument
- $var: where "var" is a local variable of buffer (see /buffer localvar)
+ $var: where "var" is a local variable of buffer (see /buffer listvar)
examples: $nick, $channel, $server, $plugin, $name
Examples:
@@ -1114,7 +1114,9 @@ Przykłady:
renumber [<number1> [<number2> [<start>]]]
close [<n1>[-<n2>]|<name>...]
notify [<level>]
- localvar [<number>|<name>]
+ listvar [<number>|<name>]
+ setvar <name> [<value>]
+ delvar <name>
set <property> [<value>]
get <property>
<number>|-|+|<name>
@@ -1138,8 +1140,10 @@ renumber: renumber buffers (works only if option weechat.look.buffer_auto_renumb
message: for messages from users + highlights
all: all messages
reset: reset to default value (all)
-localvar: display local variables for the buffer
- set: set a property for current buffer
+ listvar: display local variables in a buffer
+ setvar: set a local variable in the current buffer
+ delvar: delete a local variable from the current buffer
+ set: set a property in the current buffer
get: display a property of current buffer
number: jump to buffer by number, possible prefix:
'+': relative jump, add number to current
diff --git a/doc/pl/weechat_scripting.pl.adoc b/doc/pl/weechat_scripting.pl.adoc
index 29279354c..7ea171579 100644
--- a/doc/pl/weechat_scripting.pl.adoc
+++ b/doc/pl/weechat_scripting.pl.adoc
@@ -973,7 +973,7 @@ weechat.buffer_set(buffer, "localvar_del_myvar", "")
Aby zobaczyć lokalne zmienne danego bufora, należy wykonać tą komendę w WeeChat:
----
-/buffer localvar
+/buffer listvar
----
[[hooks]]
diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc
index 937a41b75..1e2064ec4 100644
--- a/doc/pl/weechat_user.pl.adoc
+++ b/doc/pl/weechat_user.pl.adoc
@@ -3122,7 +3122,7 @@ użycie do tego zmiennych lokalnych bufora. W celu wyświetlenia listy dostępny
zmiennych dla bufora wykonaj:
----
-/buffer localvar
+/buffer listvar
----
Maski zostaną dopasowane do opcji w kolejności malejącej specyficznie dla
diff --git a/po/cs.po b/po/cs.po
index 0fe20969e..c68a9aed4 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1251,8 +1251,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
"list || clear [<číslo>|-merged|-all] || move|merge <číslo> || unmerge "
"[<číslo>] || close [<n1>[-<n2>]] || notify <úroveň> || localvar || set "
@@ -1286,8 +1287,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -2849,6 +2852,14 @@ msgstr "čísla bufferů"
msgid "names of buffers (including plugins names)"
msgstr "jména bufferů (včetně jmen pluginů)"
+#, fuzzy
+msgid "buffer local variables"
+msgstr "konfigurační soubory"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr "hodnota promněné prostředí"
+
msgid "properties that can be set on a buffer"
msgstr "vlastnosti, které mohou být nastaveny bufferu"
@@ -4862,7 +4873,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/de.po b/po/de.po
index 575bdc6e5..529acac7c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -24,8 +24,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
-"PO-Revision-Date: 2020-12-17 11:04+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
+"PO-Revision-Date: 2020-12-19 18:20+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
"Language: de\n"
@@ -1290,6 +1290,7 @@ msgstr ""
msgid "manage buffers"
msgstr "Buffer verwalten"
+#, fuzzy
msgid ""
"list || add [-free] [-switch] <name> || clear [<number>|<name>|-merged|-all "
"[<number>|<name>...]] || move <number>|-|+ || swap <number1>|<name1> "
@@ -1297,8 +1298,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
"list || add [-free] [-switch] <name> || clear [<number>|<name>|-merged|-all "
"[<number>|<name>...]] || move <number>|-|+ || swap <number1>|<name1> "
@@ -1309,6 +1311,7 @@ msgstr ""
"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
"<property> [<value>] || get <property> || <number>|-|+|<name>"
+#, fuzzy
msgid ""
" list: list buffers (without argument, this list is displayed)\n"
" add: add a new buffer (it can be closed with \"/buffer close\" or input "
@@ -1336,8 +1339,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -3456,6 +3461,14 @@ msgstr "Anzahl der Buffer"
msgid "names of buffers (including plugins names)"
msgstr "Liste der Buffer (inklusive der Erweiterungen)"
+#, fuzzy
+msgid "buffer local variables"
+msgstr "Speichert Buffer in eine Datei"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr "Wert einer Umgebungsvariable"
+
msgid "properties that can be set on a buffer"
msgstr "Eigenschaften die für den Buffer gesetzt werden können"
@@ -5825,7 +5838,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
@@ -5860,7 +5873,7 @@ msgstr ""
" $*: alle Argumente\n"
" $~: letztes Argument\n"
" $var: \"var\" ist eine lokale Variable für den jeweiligen Buffer "
-"(siehe /buffer localvar)\n"
+"(siehe /buffer listvar)\n"
" Beispiel: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Beispiele:\n"
diff --git a/po/es.po b/po/es.po
index 143965793..cdd14f3ea 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1247,8 +1247,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
"list || clear [<número>|<nombre>|-merged|-all] || move|merge <número> || "
"swap<número1>|<nombre1> [<número2>|<nombre2>] || unmerge [<número>|-all] || "
@@ -1283,8 +1284,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -2962,6 +2965,14 @@ msgstr "números de los buffers"
msgid "names of buffers (including plugins names)"
msgstr "nombre de los buffers (incluyendo nombre de los plugins)"
+#, fuzzy
+msgid "buffer local variables"
+msgstr "Guardar registro de buffers"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr "Variables"
+
msgid "properties that can be set on a buffer"
msgstr "propiedades del buffer que pueden configurarse"
@@ -5056,7 +5067,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/fr.po b/po/fr.po
index d82e9fb1f..375a7bed5 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
-"PO-Revision-Date: 2020-12-18 20:24+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
+"PO-Revision-Date: 2020-12-19 18:18+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -1277,8 +1277,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
"list || add [-free] [-switch] <nom> || clear [<nombre>|<nom>|-merged|-all "
"[<nombre>|<nom>...]] || move <nombre>|-|+ || swap <nombre1>|<nom1> "
@@ -1286,8 +1287,9 @@ msgstr ""
"<nombre>|<nom> || unmerge [<nombre>|-all] || hide [<nombre>|<nom>|-all "
"[<nombre>|<nom>...]] || unhide [<nombre>|<nom>|-all [<nombre>|<nom>...]] || "
"renumber <nombre1> [<nombre2> [<départ>]] || close [<n1>[-<n2>]|<nom>...] || "
-"notify [<niveau>] || localvar [<nombre>|<nom>] || set <propriété> [<valeur>] "
-"|| get <propriété> || <nombre>|<nom>"
+"notify [<niveau>] || listvar [<nombre>|<nom>] || setvar <nom> [<valeur>] || "
+"delvar <nom> || set <propriété> [<valeur>] || get <propriété> || <nombre>|"
+"<nom>"
msgid ""
" list: list buffers (without argument, this list is displayed)\n"
@@ -1316,8 +1318,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -1387,7 +1391,9 @@ msgstr ""
" message : pour les messages d'utilisateurs + highlights\n"
" all : pour tous les messages\n"
" reset : réinitialise à valeur par défaut (all)\n"
-"localvar : afficher la liste des variables locales pour le tampon\n"
+" listvar : afficher la liste des variables locales d'un tampon\n"
+" setvar : modifier une variable locale du tampon courant\n"
+" delvar : supprimer une variable locale du tampon courant\n"
" set : modifier une propriété du tampon courant\n"
" get : afficher une propriété du tampon courant\n"
" nombre : sauter au tampon qui a ce numéro, préfixe possible :\n"
@@ -3370,6 +3376,12 @@ msgstr "numéros des tampons"
msgid "names of buffers (including plugins names)"
msgstr "noms des tampons (incluant les noms d'extensions)"
+msgid "buffer local variables"
+msgstr "variables locales du tampon"
+
+msgid "value of a buffer local variable"
+msgstr "valeur d'une variable locale du tampon"
+
msgid "properties that can be set on a buffer"
msgstr "propriétés qui peuvent être changées sur un tampon"
@@ -5693,7 +5705,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
@@ -5726,7 +5738,7 @@ msgstr ""
" $* : tous les paramètres\n"
" $~ : le dernier paramètre\n"
" $var : où \"var\" est une variable locale du tampon (voir /buffer "
-"localvar)\n"
+"listvar)\n"
" exemples : $nick, $channel, $server, $plugin, $name\n"
"\n"
"Exemples :\n"
diff --git a/po/hu.po b/po/hu.po
index a58002d6f..1ce3d3999 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1219,8 +1219,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
#, fuzzy
@@ -1251,8 +1252,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -2477,6 +2480,14 @@ msgid "names of buffers (including plugins names)"
msgstr ""
#, fuzzy
+msgid "buffer local variables"
+msgstr "szerver konfigurációs fájljának újraolvastatása"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr " . típus: szám\n"
+
+#, fuzzy
msgid "properties that can be set on a buffer"
msgstr "puffer betöltése sikertelen"
@@ -4417,7 +4428,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/it.po b/po/it.po
index 6acc1fd3f..fcf630366 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1225,8 +1225,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
"list || clear [<numero>|<nome>|-merged|-all] || move|merge <numero> || swap "
"<numero1>|<nome1> [<numero2>|<nome2>] || unmerge [<numero>|-all] || close "
@@ -1261,8 +1262,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -3051,6 +3054,14 @@ msgstr "numeri dei buffer"
msgid "names of buffers (including plugins names)"
msgstr "nomi dei buffer (inclusi i nomi dei plugin)"
+#, fuzzy
+msgid "buffer local variables"
+msgstr "Registra i buffer su file"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr "Variabili"
+
msgid "properties that can be set on a buffer"
msgstr "proprietà che possono essere impostate su un buffer"
@@ -5189,7 +5200,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/ja.po b/po/ja.po
index 4c8d18e53..e1a618adc 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -1252,8 +1252,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
"list || add [-free] [-switch] <name> || clear [<number>|<name>|-merged|-all "
"[<number>|<name>...]] || move <number>|-|+ || swap <number1>|<name1> "
@@ -1292,8 +1293,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -3249,6 +3252,14 @@ msgstr "バッファの数"
msgid "names of buffers (including plugins names)"
msgstr "バッファの名前 (プラグインの名前を含めた)"
+#, fuzzy
+msgid "buffer local variables"
+msgstr "ファイルにバッファログを保存"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr "環境変数の値"
+
msgid "properties that can be set on a buffer"
msgstr "バッファに指定可能なプロパティ"
@@ -5418,7 +5429,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/pl.po b/po/pl.po
index 3687da05a..4778f872a 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -1276,8 +1276,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
"list || add [-free] [-switch] <nazwa> || clear [<numer>|<nazwa>|-merged|-all "
"[<numer>|<nazwa>...]] || move <numer>|-|+ || swap <numer1>|<nazwa1> "
@@ -1316,8 +1317,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -3312,6 +3315,14 @@ msgstr "numery buforów"
msgid "names of buffers (including plugins names)"
msgstr "nazwy buforów (włącznie z nazwami wtyczek)"
+#, fuzzy
+msgid "buffer local variables"
+msgstr "Zapisuj bufory do plików"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr "wartość zmiennej środowiskowej"
+
msgid "properties that can be set on a buffer"
msgstr "właściwości, jakie mogą być ustawione w buforze"
@@ -5549,7 +5560,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/pt.po b/po/pt.po
index 296094551..767feaecb 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -1251,8 +1251,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
"list || clear [<número>|<nome>|-merged|-all [<número>|<nome>...]] || move "
"<número>|-|+ || swap <número1>|<nome1> [<número2>|<nome2>] || cycle <número>|"
@@ -1290,8 +1291,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -3242,6 +3245,14 @@ msgstr "números dos buffers"
msgid "names of buffers (including plugins names)"
msgstr "nomes dos buffers (incluindo nomes dos plugins)"
+#, fuzzy
+msgid "buffer local variables"
+msgstr "Registar buffers em ficheiros"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr "valor de uma variável de ambiente"
+
msgid "properties that can be set on a buffer"
msgstr "propriedades que podem ser definidas num buffer"
@@ -5469,7 +5480,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index da69affc9..4b5c7c6b1 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2020-04-18 11:34+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1268,8 +1268,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
"list || clear [<número>|<nome>|-merged|-all] || move|merge <número> || swap "
"<número1>|<nome1> [<número2>|<nome2>] || unmerge [<número>|-all] || close "
@@ -1305,8 +1306,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -3018,6 +3021,14 @@ msgstr "números dos buffers"
msgid "names of buffers (including plugins names)"
msgstr "nomes dos buffers (incluindo os nomes dos plugins)"
+#, fuzzy
+msgid "buffer local variables"
+msgstr "arquivos de configuração"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr "Variáveis"
+
msgid "properties that can be set on a buffer"
msgstr "propriedades que podem se configuradas em um buffer"
@@ -5039,7 +5050,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/ru.po b/po/ru.po
index bbe06f155..1799d649e 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2020-04-28 16:40+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1240,8 +1240,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
#, fuzzy
@@ -1272,8 +1273,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -2500,6 +2503,14 @@ msgid "names of buffers (including plugins names)"
msgstr ""
#, fuzzy
+msgid "buffer local variables"
+msgstr "перезагрузить конфигурационный файл сервера"
+
+#, fuzzy
+msgid "value of a buffer local variable"
+msgstr " . тип: целочисленный\n"
+
+#, fuzzy
msgid "properties that can be set on a buffer"
msgstr "загрузка буфера не удалась"
@@ -4453,7 +4464,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/tr.po b/po/tr.po
index 36ad3d4e7..9dd2c88b0 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2019-11-03 08:38+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1108,8 +1108,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
msgid ""
@@ -1139,8 +1140,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -2258,6 +2261,12 @@ msgstr ""
msgid "names of buffers (including plugins names)"
msgstr ""
+msgid "buffer local variables"
+msgstr ""
+
+msgid "value of a buffer local variable"
+msgstr ""
+
msgid "properties that can be set on a buffer"
msgstr ""
@@ -4038,7 +4047,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/po/weechat.pot b/po/weechat.pot
index 4ce35b5bc..6849f62e6 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2020-12-18 20:22+0100\n"
+"POT-Creation-Date: 2020-12-19 18:17+0100\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1112,8 +1112,9 @@ msgid ""
"<number>|<name> || unmerge [<number>|-all] || hide [<number>|<name>|-all "
"[<number>|<name>...]] || unhide [<number>|<name>|-all [<number>|<name>...]] "
"|| renumber [<number1> [<number2> [<start>]]] || close [<n1>[-<n2>]|"
-"<name>...] || notify [<level>] || localvar [<number>|<name>] || set "
-"<property> [<value>] || get <property> || <number>|-|+|<name>"
+"<name>...] || notify [<level>] || listvar [<number>|<name>] || setvar <name> "
+"[<value>] || delvar <name> || set <property> [<value>] || get <property> || "
+"<number>|-|+|<name>"
msgstr ""
msgid ""
@@ -1143,8 +1144,10 @@ msgid ""
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
-"localvar: display local variables for the buffer\n"
-" set: set a property for current buffer\n"
+" listvar: display local variables in a buffer\n"
+" setvar: set a local variable in the current buffer\n"
+" delvar: delete a local variable from the current buffer\n"
+" set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -2255,6 +2258,12 @@ msgstr ""
msgid "names of buffers (including plugins names)"
msgstr ""
+msgid "buffer local variables"
+msgstr ""
+
+msgid "value of a buffer local variable"
+msgstr ""
+
msgid "properties that can be set on a buffer"
msgstr ""
@@ -4023,7 +4032,7 @@ msgid ""
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see /buffer "
-"localvar)\n"
+"listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 3798979da..0d9648990 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -1136,8 +1136,15 @@ COMMAND_CALLBACK(buffer)
return WEECHAT_RC_OK;
}
- /* display local variables on buffer */
- if (string_strcasecmp (argv[1], "localvar") == 0)
+ /*
+ * display buffer local variables
+ *
+ * (note: option "localvar" has been replaced by "listvar" in WeeChat 3.1
+ * but is still accepted for compatibility with WeeChat ≤ 3.0;
+ * it is now deprecated and will be removed in a future version)
+ */
+ if ((string_strcasecmp (argv[1], "listvar") == 0)
+ || (string_strcasecmp (argv[1], "localvar") == 0))
{
if (argc > 2)
ptr_buffer = gui_buffer_search_by_number_or_name (argv[2]);
@@ -1168,6 +1175,34 @@ COMMAND_CALLBACK(buffer)
return WEECHAT_RC_OK;
}
+ /* set a local variable in buffer */
+ if (string_strcasecmp (argv[1], "setvar") == 0)
+ {
+ COMMAND_MIN_ARGS(3, "setvar");
+ if (argc == 3)
+ {
+ gui_buffer_local_var_add (buffer, argv[2], "");
+ }
+ else
+ {
+ value = string_remove_quotes (argv_eol[3], "'\"");
+ gui_buffer_local_var_add (buffer,
+ argv[2],
+ (value) ? value : argv_eol[3]);
+ if (value)
+ free (value);
+ }
+ return WEECHAT_RC_OK;
+ }
+
+ /* delete a local variable from a buffer */
+ if (string_strcasecmp (argv[1], "delvar") == 0)
+ {
+ COMMAND_MIN_ARGS(3, "delvar");
+ gui_buffer_local_var_remove (buffer, argv[2]);
+ return WEECHAT_RC_OK;
+ }
+
/* set a property on buffer */
if (string_strcasecmp (argv[1], "set") == 0)
{
@@ -7178,7 +7213,9 @@ command_init ()
" || renumber [<number1> [<number2> [<start>]]]"
" || close [<n1>[-<n2>]|<name>...]"
" || notify [<level>]"
- " || localvar [<number>|<name>]"
+ " || listvar [<number>|<name>]"
+ " || setvar <name> [<value>]"
+ " || delvar <name>"
" || set <property> [<value>]"
" || get <property>"
" || <number>|-|+|<name>"),
@@ -7209,8 +7246,10 @@ command_init ()
" message: for messages from users + highlights\n"
" all: all messages\n"
" reset: reset to default value (all)\n"
- "localvar: display local variables for the buffer\n"
- " set: set a property for current buffer\n"
+ " listvar: display local variables in a buffer\n"
+ " setvar: set a local variable in the current buffer\n"
+ " delvar: delete a local variable from the current buffer\n"
+ " set: set a property in the current buffer\n"
" get: display a property of current buffer\n"
" number: jump to buffer by number, possible prefix:\n"
" '+': relative jump, add number to current\n"
@@ -7265,7 +7304,9 @@ command_init ()
" || close %(buffers_plugins_names)|%*"
" || list"
" || notify reset|none|highlight|message|all"
- " || localvar %(buffers_numbers)|%(buffers_plugins_names)"
+ " || listvar %(buffers_numbers)|%(buffers_plugins_names)"
+ " || setvar %(buffer_local_variables) %(buffer_local_variable_value)"
+ " || delvar %(buffer_local_variables)"
" || set %(buffer_properties_set)"
" || get %(buffer_properties_get)"
" || %(buffers_plugins_names)|%(buffers_names)|%(irc_channels)|"
diff --git a/src/core/wee-completion.c b/src/core/wee-completion.c
index 5726a3ed0..caa5fae50 100644
--- a/src/core/wee-completion.c
+++ b/src/core/wee-completion.c
@@ -1,4 +1,3 @@
-
/*
* wee-completion.c - completion for WeeChat commands
*
@@ -202,6 +201,97 @@ completion_list_add_buffers_plugins_names_cb (const void *pointer, void *data,
}
/*
+ * Adds a buffer local variable to completions list.
+ */
+
+void
+completion_list_map_buffer_local_variable_cb (void *data,
+ struct t_hashtable *hashtable,
+ const void *key, const void *value)
+{
+ /* make C compiler happy */
+ (void) hashtable;
+ (void) value;
+
+ gui_completion_list_add ((struct t_gui_completion *)data,
+ (const char *)key,
+ 0, WEECHAT_LIST_POS_SORT);
+}
+
+/*
+ * Adds buffer local variables to completion list.
+ */
+
+int
+completion_list_add_buffer_local_variables_cb (const void *pointer, void *data,
+ const char *completion_item,
+ struct t_gui_buffer *buffer,
+ struct t_gui_completion *completion)
+{
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) completion_item;
+ (void) buffer;
+
+ hashtable_map (completion->buffer->local_variables,
+ &completion_list_map_buffer_local_variable_cb,
+ completion);
+
+ return WEECHAT_RC_OK;
+}
+
+/*
+ * Adds buffer local variable value to completion list.
+ */
+
+int
+completion_list_add_buffer_local_variable_value_cb (const void *pointer, void *data,
+ const char *completion_item,
+ struct t_gui_buffer *buffer,
+ struct t_gui_completion *completion)
+{
+ char **argv;
+ int argc, arg_index;
+ const char *ptr_value;
+
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) completion_item;
+ (void) buffer;
+
+ if (!completion->args)
+ return WEECHAT_RC_OK;
+
+ argv = string_split (completion->args, " ", NULL,
+ WEECHAT_STRING_SPLIT_STRIP_LEFT
+ | WEECHAT_STRING_SPLIT_STRIP_RIGHT
+ | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
+ 0, &argc);
+ if (!argv)
+ return WEECHAT_RC_OK;
+
+ if (argc > 0)
+ {
+ arg_index = completion->base_command_arg_index - 2;
+ if ((arg_index < 1) || (arg_index > argc - 1))
+ arg_index = argc - 1;
+ ptr_value = hashtable_get (completion->buffer->local_variables,
+ argv[arg_index]);
+ if (ptr_value)
+ {
+ gui_completion_list_add (completion,
+ ptr_value,
+ 0, WEECHAT_LIST_POS_SORT);
+ }
+ }
+ string_free_split (argv);
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Adds buffer properties (that can be set) to completion list.
*/
@@ -1712,6 +1802,12 @@ completion_init ()
hook_completion (NULL, "buffers_plugins_names", /* formerly "%B" */
N_("names of buffers (including plugins names)"),
&completion_list_add_buffers_plugins_names_cb, NULL, NULL);
+ hook_completion (NULL, "buffer_local_variables",
+ N_("buffer local variables"),
+ &completion_list_add_buffer_local_variables_cb, NULL, NULL);
+ hook_completion (NULL, "buffer_local_variable_value",
+ N_("value of a buffer local variable"),
+ &completion_list_add_buffer_local_variable_value_cb, NULL, NULL);
hook_completion (NULL, "buffer_properties_set",
N_("properties that can be set on a buffer"),
&completion_list_add_buffer_properties_set_cb, NULL, NULL);
diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h
index a7011d47c..5231392d8 100644
--- a/src/gui/gui-buffer.h
+++ b/src/gui/gui-buffer.h
@@ -255,6 +255,11 @@ extern int gui_buffer_search_notify (const char *notify);
extern const char *gui_buffer_get_plugin_name (struct t_gui_buffer *buffer);
extern const char *gui_buffer_get_short_name (struct t_gui_buffer *buffer);
extern void gui_buffer_build_full_name (struct t_gui_buffer *buffer);
+extern void gui_buffer_local_var_add (struct t_gui_buffer *buffer,
+ const char *name,
+ const char *value);
+extern void gui_buffer_local_var_remove (struct t_gui_buffer *buffer,
+ const char *name);
extern void gui_buffer_notify_set_all ();
extern void gui_buffer_input_buffer_init (struct t_gui_buffer *buffer);
extern int gui_buffer_is_reserved_name (const char *name);
diff --git a/src/plugins/alias/alias-command.c b/src/plugins/alias/alias-command.c
index 171a264b4..14e2c93e9 100644
--- a/src/plugins/alias/alias-command.c
+++ b/src/plugins/alias/alias-command.c
@@ -274,7 +274,7 @@ alias_command_init ()
" $*: all arguments\n"
" $~: last argument\n"
" $var: where \"var\" is a local variable of buffer (see "
- "/buffer localvar)\n"
+ "/buffer listvar)\n"
" examples: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Examples:\n"