weechat / weechat

The extensible chat client.
https://weechat.org
GNU General Public License v3.0
2.99k stars 333 forks source link

Custom Time Toggle Not Working Properly #1936

Closed ghost closed 1 year ago

ghost commented 1 year ago

Bug summary

Custom time format is not saved when /toggle option is used to set an option.

Steps to reproduce

1. /alias add time /mute /toggle weechat.look.buffer_time_format "${color:240}%I:%M:%S.%p" 2. /time (will hide custom time format) 3. /time (when run again it will just reset to default time format "%H:%M:%S"

Current behavior

Alias does not save custom time format when /toggle is used on weechat.look.buffer_time_format.

Expected behavior

Save and restore custom time format.

Suggested solutions

No idea!

Additional information

None.


flashcode commented 1 year ago

Hi,

What do you want to do? If you want to toggle between different values, you must give all values to the /toggle command, like this:

/toggle option value1 value2 ...

If you give only one value, then it toggles between this value and the default value of the option.

For me the command works as expected.

ghost commented 1 year ago

@flashcode, you are right :-) I was using it wrong, I just tested the following command and it works.

/alias add time /mute /toggle weechat.look.buffer_time_format "${color:240}%I:%M:%S.%p" "---"

But is this possible to do per buffer instead of all buffers?

flashcode commented 1 year ago

No, this is not possible to customize time per buffer.