summaryrefslogtreecommitdiff
path: root/doc/sr
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-10-01 22:55:38 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-10-01 22:55:38 +0200
commitad5fa7c99faf8a1c0b6b9b1f7f6e4b42a03a5c2c (patch)
tree34dca4da20d04e00dc5548d31bf6de73c6c7fc0e /doc/sr
parent9548a4cf747c54aac641544049a24fb1f270c14f (diff)
downloadweechat-ad5fa7c99faf8a1c0b6b9b1f7f6e4b42a03a5c2c.zip
core: add command /toggle
Diffstat (limited to 'doc/sr')
-rw-r--r--doc/sr/includes/autogen_user_commands.sr.adoc26
-rw-r--r--doc/sr/weechat_dev.sr.adoc2
2 files changed, 28 insertions, 0 deletions
diff --git a/doc/sr/includes/autogen_user_commands.sr.adoc b/doc/sr/includes/autogen_user_commands.sr.adoc
index 5cf00a51e..1e0c28e8e 100644
--- a/doc/sr/includes/autogen_user_commands.sr.adoc
+++ b/doc/sr/includes/autogen_user_commands.sr.adoc
@@ -1993,6 +1993,32 @@ passphrase: измена тајне реченице (без passphrase, под
/set env ABC ""
----
+[[command_weechat_toggle]]
+* `+toggle+`: toggle value of a config option
+
+----
+/toggle <option> [<value> [<value>...]]
+
+option: name of an option
+ value: possible values for the option (values are split like the shell command arguments: quotes can be used to preserve spaces at the beginning/end of values)
+
+Behavior:
+ - only an option of type boolean or string can be toggled without a value:
+ - boolean: toggle between on/off according to current value
+ - string: toggle between empty string and default value (works only if empty string is allowed for the option)
+ - with a single value given, toggle between this value and the default value of option
+ - with multiple values given, toggle between these values: the value used is the one following the current value of option; if the current value of option is not in list, the first value in the list is used
+ - the special value "null" can be given, but only as first value in the list and without quotes around.
+
+Examples:
+ toggle display of time in chat area (without displaying the new value used):
+ /mute /toggle weechat.look.buffer_time_format
+ switch format of time in chat area (with seconds, without seconds, disabled):
+ /toggle weechat.look.buffer_time_format "%H:%M:%S" "%H:%M" ""
+ toggle autojoin of #weechat channel on libera server:
+ /toggle irc.server.libera.autojoin null #weechat
+----
+
[[command_weechat_unset]]
* `+unset+`: уклањање/ресетовање конфиг опција
diff --git a/doc/sr/weechat_dev.sr.adoc b/doc/sr/weechat_dev.sr.adoc
index b42632b6e..2f90e386e 100644
--- a/doc/sr/weechat_dev.sr.adoc
+++ b/doc/sr/weechat_dev.sr.adoc
@@ -403,6 +403,8 @@ WeeChat „језгро” се налази у следећим директо
|       core/ | Корен unit тестова језгра.
|          test-core-arraylist.cpp | Тестови: arraylists.
|          test-core-calc.cpp | Тестови: калкулација израза.
+// TRANSLATION MISSING
+|          test-core-config-file.cpp | Tests: configuration files.
|          test-core-crypto.cpp | Тестови: криптографске функције.
|          test-core-dir.cpp | Тестови: функције директоријума/фајла.
|          test-core-eval.cpp | Тестови: израчунавање израза.