summaryrefslogtreecommitdiff
path: root/doc/ja/includes/autogen_user_commands.ja.adoc
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/ja/includes/autogen_user_commands.ja.adoc
parent9548a4cf747c54aac641544049a24fb1f270c14f (diff)
downloadweechat-ad5fa7c99faf8a1c0b6b9b1f7f6e4b42a03a5c2c.zip
core: add command /toggle
Diffstat (limited to 'doc/ja/includes/autogen_user_commands.ja.adoc')
-rw-r--r--doc/ja/includes/autogen_user_commands.ja.adoc26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/ja/includes/autogen_user_commands.ja.adoc b/doc/ja/includes/autogen_user_commands.ja.adoc
index 988be618e..4c0a70dc0 100644
--- a/doc/ja/includes/autogen_user_commands.ja.adoc
+++ b/doc/ja/includes/autogen_user_commands.ja.adoc
@@ -1993,6 +1993,32 @@ option: オプションの名前 (value を指定せずにワイルドカード
/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+`: オプションのアンセット/リセット