rtorrent-ps
rtorrent-ps copied to clipboard
Add new `case` command
case = ‹expression›, {‹val1›, ‹cmd1›[, …]} […] [, {(otherwise), ‹default1›[, …]}]
Means we have two new commands. otherwise
returns a singleton value and is thus uniquely identifiable.
case
goes through the array elements and compares the case expression against the case values, on the first match it executes the associated commands and returns their result. (otherwise)
always matches.