{"action":"created","issue":{"url":"https://api.github.com/repos/rakshasa/rtorrent/issues/384","repository_url":"https://api.github.com/repos/rakshasa/rtorrent","labels_url":"https://api.github.com/repos/rakshasa/rtorrent/issues/384/labels{/name}","comments_url":"https://api.github.com/repos/rakshasa/rtorrent/issues/384/comments","events_url":"https://api.github.com/repos/rakshasa/rtorrent/issues/384/events","html_url":"https://github.com/rakshasa/rtorrent/issues/384","id":129372936,"number":384,"title":"variable use in rtorrent.rc","user":{"login":"rezad1393","id":7523164,"avatar_url":"https://avatars.githubusercontent.com/u/7523164?v=3","gravatar_id":"","url":"https://api.github.com/users/rezad1393","html_url":"https://github.com/rezad1393","followers_url":"https://api.github.com/users/rezad1393/followers","following_url":"https://api.github.com/users/rezad1393/following{/other_user}","gists_url":"https://api.github.com/users/rezad1393/gists{/gist_id}","starred_url":"https://api.github.com/users/rezad1393/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rezad1393/subscriptions","organizations_url":"https://api.github.com/users/rezad1393/orgs","repos_url":"https://api.github.com/users/rezad1393/repos","events_url":"https://api.github.com/users/rezad1393/events{/privacy}","received_events_url":"https://api.github.com/users/rezad1393/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-01-28T07:57:28Z","updated_at":"2016-03-09T18:37:51Z","closed_at":"2016-03-08T22:04:49Z","body":"can custom variables be used in rtorrent.rc ?\r\nsomething like bash variables?\r\n"},"comment":{"url":"https://api.github.com/repos/rakshasa/rtorrent/issues/comments/194442325","html_url":"https://github.com/rakshasa/rtorrent/issues/384#issuecomment-194442325","issue_url":"https://api.github.com/repos/rakshasa/rtorrent/issues/384","id":194442325,"user":{"login":"chros73","id":2642205,"avatar_url":"https://avatars.githubusercontent.com/u/2642205?v=3","gravatar_id":"","url":"https://api.github.com/users/chros73","html_url":"https://github.com/chros73","followers_url":"https://api.github.com/users/chros73/followers","following_url":"https://api.github.com/users/chros73/following{/other_user}","gists_url":"https://api.github.com/users/chros73/gists{/gist_id}","starred_url":"https://api.github.com/users/chros73/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chros73/subscriptions","organizations_url":"https://api.github.com/users/chros73/orgs","repos_url":"https://api.github.com/users/chros73/repos","events_url":"https://api.github.com/users/chros73/events{/privacy}","received_events_url":"https://api.github.com/users/chros73/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T18:37:51Z","updated_at":"2016-03-09T18:37:51Z","body":"@rezad1393:\r\n1. \"but in your rtorrent it has a PyroScope setting. so that needs the rtorrent-ps not rtorrent right?\"\r\nWell, it depends how you want to organize it. In the previous example `pyro.bin_dir` was just a name from my config, but you can name it as you want (it just points to a directory where our scripts are). And since we use this 'variable' in our main rtorrent config we can leave it there.\r\n2. \"I asked if rtorrent can change its port based on the local ip when it is running\"\r\nNo, you can't do it on the fly: you have to restart rtorrent for that.\r\n\r\n@pyroscope: Thanks, I saw your commit and pull request as well. But sometimes I want to create variables in rtorrent not system wise, e.g.: https://github.com/chros73/rtorrent-ps_setup/blob/master/ubuntu-14.04/home/chros73/.rtorrent.rc#L79\r\n\r\n@rakshasa: thanks for the explanation. Have you only talked about those 2 commends? (`execute`, `schedule`)\r\nBecause I tried out with `cat` (which was heavily used in the example above) and I can't concatenate more than 1 strings in any other way but as I've written in the above example. So, this is working: `print=$foo=`\r\n```\r\nmethod.insert = foo, simple|value|private, \"cat=x,-,y\"\r\n```\r\nHow would you rewrite this in the appropriate way?\r\n\r\nBecause of this I only write the above schedule line in one of the following ways:\r\n```\r\nmethod.insert = get_port_number, simple|value|private, \"execute.capture=\\\"$cat=$pyro.bin_dir=,getPortNumber.sh\\\"\"\r\nmethod.insert = get_port_number, simple|value|private, \"execute.capture={\\\"$cat=$pyro.bin_dir=,getPortNumber.sh\\\"}\"\r\n```"}}