{"action":"created","issue":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1263","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1263/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1263/comments","events_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1263/events","html_url":"https://github.com/The-Compiler/qutebrowser/pull/1263","id":128244304,"number":1263,"title":"Relax editor templating","user":{"login":"Olical","id":315229,"avatar_url":"https://avatars.githubusercontent.com/u/315229?v=3","gravatar_id":"","url":"https://api.github.com/users/Olical","html_url":"https://github.com/Olical","followers_url":"https://api.github.com/users/Olical/followers","following_url":"https://api.github.com/users/Olical/following{/other_user}","gists_url":"https://api.github.com/users/Olical/gists{/gist_id}","starred_url":"https://api.github.com/users/Olical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Olical/subscriptions","organizations_url":"https://api.github.com/users/Olical/orgs","repos_url":"https://api.github.com/users/Olical/repos","events_url":"https://api.github.com/users/Olical/events{/privacy}","received_events_url":"https://api.github.com/users/Olical/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-01-22T20:59:55Z","updated_at":"2016-02-02T12:32:40Z","closed_at":"2016-02-02T05:54:51Z","pull_request":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/pulls/1263","html_url":"https://github.com/The-Compiler/qutebrowser/pull/1263","diff_url":"https://github.com/The-Compiler/qutebrowser/pull/1263.diff","patch_url":"https://github.com/The-Compiler/qutebrowser/pull/1263.patch"},"body":"I tried to set my editor to `termite -e \"vim -f {}\"`, termite being a\r\npretty cool and light terminal I use within my i3wm Arch linux box.\r\n\r\nSo when I open my editor I want it to launch a terminal with Vim inside\r\ninstead of GVim for various reasons.\r\n\r\nThe validation rejected this at first because it was looking for '{}'\r\ninside ['foo', 'bar', 'baz {}'], essentially. So I need it to look\r\ninside the sub-strings, not just the list.\r\n\r\nThen after validation I need to perform the '{}' replacement inside the\r\nsub-string too, not just replacing the whole string.\r\n\r\n--------------------\r\n\r\nI'm not sure what I'm supposed to do testing wise, I haven't written production Python for quite a few years. Let me know if there's anything you'd like me to do or if this approach is a bad one! Happy to change it, I just would like this sub string thing to work :)\r\n\r\nThe main issue I has was that you're looking for a standalone '{}' token from shlex, but if you use quotes in your editor command it ends up grouping the '{}' token with other tokens found inside the string.\r\n\r\nThoughts?\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/the-compiler/qutebrowser/1263)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/comments/178551021","html_url":"https://github.com/The-Compiler/qutebrowser/pull/1263#issuecomment-178551021","issue_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1263","id":178551021,"user":{"login":"lamarpavel","id":4991168,"avatar_url":"https://avatars.githubusercontent.com/u/4991168?v=3","gravatar_id":"","url":"https://api.github.com/users/lamarpavel","html_url":"https://github.com/lamarpavel","followers_url":"https://api.github.com/users/lamarpavel/followers","following_url":"https://api.github.com/users/lamarpavel/following{/other_user}","gists_url":"https://api.github.com/users/lamarpavel/gists{/gist_id}","starred_url":"https://api.github.com/users/lamarpavel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamarpavel/subscriptions","organizations_url":"https://api.github.com/users/lamarpavel/orgs","repos_url":"https://api.github.com/users/lamarpavel/repos","events_url":"https://api.github.com/users/lamarpavel/events{/privacy}","received_events_url":"https://api.github.com/users/lamarpavel/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T12:32:39Z","updated_at":"2016-02-02T12:32:39Z","body":"Working perfectly, thank you very much!"}}