{"action":"created","issue":{"url":"https://api.github.com/repos/rking/ag.vim/issues/100","labels_url":"https://api.github.com/repos/rking/ag.vim/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/rking/ag.vim/issues/100/comments","events_url":"https://api.github.com/repos/rking/ag.vim/issues/100/events","html_url":"https://github.com/rking/ag.vim/pull/100","id":72022042,"number":100,"title":"Fix for versions after 0.29","user":{"login":"epmatsw","id":1126580,"avatar_url":"https://avatars.githubusercontent.com/u/1126580?v=3","gravatar_id":"","url":"https://api.github.com/users/epmatsw","html_url":"https://github.com/epmatsw","followers_url":"https://api.github.com/users/epmatsw/followers","following_url":"https://api.github.com/users/epmatsw/following{/other_user}","gists_url":"https://api.github.com/users/epmatsw/gists{/gist_id}","starred_url":"https://api.github.com/users/epmatsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epmatsw/subscriptions","organizations_url":"https://api.github.com/users/epmatsw/orgs","repos_url":"https://api.github.com/users/epmatsw/repos","events_url":"https://api.github.com/users/epmatsw/events{/privacy}","received_events_url":"https://api.github.com/users/epmatsw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-04-30T00:08:20Z","updated_at":"2015-11-28T21:50:14Z","closed_at":"2015-05-11T23:49:24Z","pull_request":{"url":"https://api.github.com/repos/rking/ag.vim/pulls/100","html_url":"https://github.com/rking/ag.vim/pull/100","diff_url":"https://github.com/rking/ag.vim/pull/100.diff","patch_url":"https://github.com/rking/ag.vim/pull/100.patch"},"body":"The regex used to check if the version is > 0.25 breaks for versions with format 0.AB.X where A > 2 and B < 5. This means that with the latest version of ag (0.30.0), the result formatting gets messed up.\r\n\r\nThe check is using [2-9][5-9] to check the middle number, so:\r\n0.19.0 - fail\r\n0.20.0 - fail\r\n0.25.0 - pass\r\n0.30.0 - fail (current version :()\r\n0.31.0 - fail\r\n0.35.0 - pass\r\n0.40.0 - fail\r\n\r\nThe new regex is a little more complicated, but uses (2[5-9])|([3-9][0-9]).\r\n0.19.0 - fail\r\n0.20.0 - fail\r\n0.25.0 - pass\r\n0.30.0 - pass (current version :D)\r\n0.31.0 - pass\r\n0.35.0 - pass\r\n0.40.0 - pass\r\n"},"comment":{"url":"https://api.github.com/repos/rking/ag.vim/issues/comments/160338687","html_url":"https://github.com/rking/ag.vim/pull/100#issuecomment-160338687","issue_url":"https://api.github.com/repos/rking/ag.vim/issues/100","id":160338687,"user":{"login":"amerlyq","id":5730096,"avatar_url":"https://avatars.githubusercontent.com/u/5730096?v=3","gravatar_id":"","url":"https://api.github.com/users/amerlyq","html_url":"https://github.com/amerlyq","followers_url":"https://api.github.com/users/amerlyq/followers","following_url":"https://api.github.com/users/amerlyq/following{/other_user}","gists_url":"https://api.github.com/users/amerlyq/gists{/gist_id}","starred_url":"https://api.github.com/users/amerlyq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amerlyq/subscriptions","organizations_url":"https://api.github.com/users/amerlyq/orgs","repos_url":"https://api.github.com/users/amerlyq/repos","events_url":"https://api.github.com/users/amerlyq/events{/privacy}","received_events_url":"https://api.github.com/users/amerlyq/received_events","type":"User","site_admin":false},"created_at":"2015-11-28T21:50:14Z","updated_at":"2015-11-28T21:50:14Z","body":"I think, that more robust way would be to discard all older versions, because their format is already well-known, then trying to guess all possible future formats. Therefore this check must be something like:\r\n```\r\n!split(system(\"ag --version\"), \"\\_s\")[2] =~ '\\v0\\.%(\\d|1\\d|2[0-4])%(.\\d+)?'\r\n```"}}