/alias add cycle_build /mute /unset plugins.var.buffer_cycle;/mute /set plugins.var.buffer_cycle_cond $*;/allbuf /eval /${if:${eval_cond:${plugins.var.buffer_cycle_cond}}!=?mute /set plugins.var.buffer_cycle ${plugins.var.buffer_cycle} ${buffer.name}}
/alias add cycle_cond /cycle_build $*;/eval /mute /buffer cycle ${plugins.var.buffer_cycle}
/cycle_cond ${channel} =~ l
will cycle between any channel with l in their name.
Note: the previous command will also match servers and queries since they also defined the channel variable. To search only for channels with 'l' in their names:
/cycle_cond ${channel} =~ l && ${type} == channel
/cycle_cond }
cycle all buffers since } is true
Everything is truthy except 0 and no value:
/eval -n ${eval_cond:}
/eval -n ${eval_cond:0}
There is just one thing to note, if you want to match ${ literally, you will have to escape it, otherwise weechat will wait for a closing brace
/buffer add test${
/cycle_cond ${buffer.name} =* *\${
A little bit harder for a regex since you must disable the eval meaning of ${ and the regex meaning of $ and {
/cycle_cond ${buffer.name} =~ \\$\{