This can be used to write configs that work on older builds (and on vanilla), when new features / commands are introduced. Especially in combination with a branched import, so whole snippets using new features are safe and don't blow up in older builds.
To make sure the system.has command can be actually used, add this somewhere early in the config:
# `system.has` polyfill (the "false=" silences the `catch` command, in rTorrent-PS)
catch = {"false=", "method.redirect=system.has,false"}
The following branch somehow self-absorbed shows how this can be used:
branch=(system.has, system.has), ((print, "Your build can haz system.has!"))
In a vanilla rTorrent, there is silence, and zero capabilities.
Docs: https://rtorrent-docs.readthedocs.io/en/latest/cmd-ref.html#term-system-has
This can be used to write configs that work on older builds (and on vanilla), when new features / commands are introduced. Especially in combination with a branched
import, so whole snippets using new features are safe and don't blow up in older builds.To make sure the
system.hascommand can be actually used, add this somewhere early in the config:The following
branchsomehow self-absorbed shows how this can be used:In a vanilla rTorrent, there is silence, and zero capabilities.