{"action":"created","issue":{"url":"https://api.github.com/repos/jarun/googler/issues/73","repository_url":"https://api.github.com/repos/jarun/googler","labels_url":"https://api.github.com/repos/jarun/googler/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/jarun/googler/issues/73/comments","events_url":"https://api.github.com/repos/jarun/googler/issues/73/events","html_url":"https://github.com/jarun/googler/issues/73","id":152792785,"number":73,"title":"Return non-zero exit code when no hits are returned","user":{"login":"spamwalter","id":1847653,"avatar_url":"https://avatars.githubusercontent.com/u/1847653?v=3","gravatar_id":"","url":"https://api.github.com/users/spamwalter","html_url":"https://github.com/spamwalter","followers_url":"https://api.github.com/users/spamwalter/followers","following_url":"https://api.github.com/users/spamwalter/following{/other_user}","gists_url":"https://api.github.com/users/spamwalter/gists{/gist_id}","starred_url":"https://api.github.com/users/spamwalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spamwalter/subscriptions","organizations_url":"https://api.github.com/users/spamwalter/orgs","repos_url":"https://api.github.com/users/spamwalter/repos","events_url":"https://api.github.com/users/spamwalter/events{/privacy}","received_events_url":"https://api.github.com/users/spamwalter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jarun/googler/labels/wontfix","name":"wontfix","color":"f7c6c7"}],"state":"closed","locked":true,"assignee":null,"milestone":null,"comments":20,"created_at":"2016-05-03T14:48:01Z","updated_at":"2016-05-03T19:08:55Z","closed_at":"2016-05-03T18:09:05Z","body":"I am automating searches and would like to detect failures without parsing the stdout.  The grep command line tool allows for this by returning a non-zero exit code when it matches nothing.  I would like this feature in googler.\r\n\r\nThank you!\r\n\r\n(I love this software!)"},"comment":{"url":"https://api.github.com/repos/jarun/googler/issues/comments/216633716","html_url":"https://github.com/jarun/googler/issues/73#issuecomment-216633716","issue_url":"https://api.github.com/repos/jarun/googler/issues/73","id":216633716,"user":{"login":"jarun","id":5959286,"avatar_url":"https://avatars.githubusercontent.com/u/5959286?v=3","gravatar_id":"","url":"https://api.github.com/users/jarun","html_url":"https://github.com/jarun","followers_url":"https://api.github.com/users/jarun/followers","following_url":"https://api.github.com/users/jarun/following{/other_user}","gists_url":"https://api.github.com/users/jarun/gists{/gist_id}","starred_url":"https://api.github.com/users/jarun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarun/subscriptions","organizations_url":"https://api.github.com/users/jarun/orgs","repos_url":"https://api.github.com/users/jarun/repos","events_url":"https://api.github.com/users/jarun/events{/privacy}","received_events_url":"https://api.github.com/users/jarun/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T19:08:55Z","updated_at":"2016-05-03T19:08:55Z","body":"@spamwalter I have put forward my arguments earlier and am fine with not fixing this issue. You have to work around this with the non-interactive mode and jason output. That's the best we can do.\r\n\r\nA quick solution seems to be a wrapper script around `googler` that does the json parsing and returns an error exit code in case of no results.\r\n\r\nThanks for your understanding."}}