diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-06-14 19:59:30 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-06-14 19:59:30 +0200 |
commit | 679276f1cca5f9f77e2447d41e115b60677882a1 (patch) | |
tree | 7b3b6e1e7f7183af4c922bb6465e2444b55d1036 | |
parent | d8f318df75d5d3f204ff5432ef72696f83e792e1 (diff) | |
download | wee-slack-679276f1cca5f9f77e2447d41e115b60677882a1.tar.gz |
Support unsetting buffer label
-rw-r--r-- | wee_slack.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index 07c7526..a7ce6fe 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -4947,16 +4947,18 @@ def command_back(data, current_buffer, args): @utf8_decode def command_label(data, current_buffer, args): """ - /label <name> + /label <name>|-unset Rename a channel or thread buffer. Note that this only changes the short name and that it's not permanent. It will only last as long as you keep the buffer and wee-slack open. """ channel = EVENTROUTER.weechat_controller.buffers[current_buffer] - channel.label = args + channel.label = args if args != "-unset" else None channel.rename() return w.WEECHAT_RC_OK +command_label.completion = "-unset %-" + @utf8_decode def set_unread_cb(data, current_buffer, command): |