{"action":"created","issue":{"url":"https://api.github.com/repos/abo-abo/swiper/issues/837","repository_url":"https://api.github.com/repos/abo-abo/swiper","labels_url":"https://api.github.com/repos/abo-abo/swiper/issues/837/labels{/name}","comments_url":"https://api.github.com/repos/abo-abo/swiper/issues/837/comments","events_url":"https://api.github.com/repos/abo-abo/swiper/issues/837/events","html_url":"https://github.com/abo-abo/swiper/issues/837","id":197284010,"number":837,"title":"Is counsel-ag command missing a parameter?","user":{"login":"fpopineau","id":1915631,"avatar_url":"https://avatars.githubusercontent.com/u/1915631?v=3","gravatar_id":"","url":"https://api.github.com/users/fpopineau","html_url":"https://github.com/fpopineau","followers_url":"https://api.github.com/users/fpopineau/followers","following_url":"https://api.github.com/users/fpopineau/following{/other_user}","gists_url":"https://api.github.com/users/fpopineau/gists{/gist_id}","starred_url":"https://api.github.com/users/fpopineau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpopineau/subscriptions","organizations_url":"https://api.github.com/users/fpopineau/orgs","repos_url":"https://api.github.com/users/fpopineau/repos","events_url":"https://api.github.com/users/fpopineau/events{/privacy}","received_events_url":"https://api.github.com/users/fpopineau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-22T22:58:13Z","updated_at":"2016-12-28T10:30:58Z","closed_at":null,"body":"I'm new to ivy/swifer/counsel, but wanted to give it a try.\r\nI'm running Emacs-25.1 under Windows. \r\nI tried `counsel-ag' but got no results. Then I traced the command which counsel is running and I found something like this:\r\n\r\n    counsel--async-command: ag --nocolor --nogroup  -- \"HANDLE\"\r\n\r\nBut with no file/directory on the line. Is that expected?\r\nBecause to get results, I had to apply this patch:\r\n```\r\n$ diff -u swiper/counsel.el ~/.emacs.d/elpa/counsel-20161219.731/\r\n--- swiper/counsel.el   2016-12-22 18:16:33.339690000 +0100\r\n+++ /c/Home/.emacs.d/elpa/counsel-20161219.731/counsel.el       2016-12-22 23:53:17.360922700 +0100\r\n@@ -1685,7 +1688,7 @@\r\n       (let* ((args-end (string-match \" -- \" extra-ag-args))\r\n              (file (if args-end\r\n                        (substring-no-properties extra-ag-args (+ args-end 3))\r\n-                     \"\"))\r\n+                     default-directory))\r\n              (extra-ag-args (if args-end\r\n                                 (substring-no-properties extra-ag-args 0 args-end)\r\n                               extra-ag-args))\r\n@@ -1693,6 +1696,7 @@\r\n                              (concat extra-ag-args\r\n                                      \" -- \"\r\n                                      (shell-quote-argument regex)\r\n+                                     \" \"\r\n                                      file))))\r\n         (if (file-remote-p default-directory)\r\n             (split-string (shell-command-to-string ag-cmd) \"\\n\" t)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/abo-abo/swiper/issues/comments/269458385","html_url":"https://github.com/abo-abo/swiper/issues/837#issuecomment-269458385","issue_url":"https://api.github.com/repos/abo-abo/swiper/issues/837","id":269458385,"user":{"login":"fpopineau","id":1915631,"avatar_url":"https://avatars.githubusercontent.com/u/1915631?v=3","gravatar_id":"","url":"https://api.github.com/users/fpopineau","html_url":"https://github.com/fpopineau","followers_url":"https://api.github.com/users/fpopineau/followers","following_url":"https://api.github.com/users/fpopineau/following{/other_user}","gists_url":"https://api.github.com/users/fpopineau/gists{/gist_id}","starred_url":"https://api.github.com/users/fpopineau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpopineau/subscriptions","organizations_url":"https://api.github.com/users/fpopineau/orgs","repos_url":"https://api.github.com/users/fpopineau/repos","events_url":"https://api.github.com/users/fpopineau/events{/privacy}","received_events_url":"https://api.github.com/users/fpopineau/received_events","type":"User","site_admin":false},"created_at":"2016-12-28T10:30:58Z","updated_at":"2016-12-28T10:30:58Z","body":"What version of ag is that ? Mine from msys2/mingw64 is waiting on standard input with:\r\n```\r\nag --nocolor --nogroup HANDLE\r\n```\r\nI need to specify a directory in order to make it look for something, hence my proposed addition of default-directory to the command arguments.\r\nVersion reported is:\r\n```\r\n$ ag --version\r\nag version 0.31.0\r\n\r\nFeatures:\r\n  +jit +lzma +zlib\r\n```\r\nI will add the PR."}}
{"actor":{"display_login":"fpopineau"}}