[Libtorrent-devel] rTorrent - Splitting commands into multiple lines

Jari Sundell sundell.software at gmail.com
Mon Jun 7 03:49:28 UTC 2010


On Sun, Jun 6, 2010 at 11:27 PM, Perl Whore <whoreperl at gmail.com> wrote:
> I have the following in my .rtorrent.rc
>
> system.method.set_key =
> event.download.finished,on_completion,"d.set_directory=$d.get_custom=movedir;execute=mv,-u,$d.get_base_path=,$d.get_directory=;execute=screen,-dmS,rtsbg,addtosnatch,$d.get_hash=;execute=screen,-dmS,rtsbg,addinfo,$d.get_directory=,$d.get_hash=;execute=screen,-dmS,tlogger,tlogger,$d.get_directory=,$d.get_name=;execute=screen,-dmS,vtfilesbg,mkvirtual,$d.get_directory=;d.set_custom=completion_time,\"$execute_capture={perl,-e,print,-e,time;}\""
>
> Is it possible to separate these commands into multiple lines (one
> comment per line) for better readability?

You can just do:

event.download.finished,on_completion_1,"d.set_directory=$d.get_custom=movedir;execute=mv,-u,$d.get_base_path=,$d.get_directory="
event.download.finished,on_completion_2,"execute=mv,-u,$d.get_base_path=,$d.get_directory="

etc..

They will be called in lexical order so there's no need to put them
all under the same key.

Jari Sundell


More information about the Libtorrent-devel mailing list