{"action":"created","issue":{"url":"https://api.github.com/repos/Lindydancer/e2ansi/issues/5","repository_url":"https://api.github.com/repos/Lindydancer/e2ansi","labels_url":"https://api.github.com/repos/Lindydancer/e2ansi/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/Lindydancer/e2ansi/issues/5/comments","events_url":"https://api.github.com/repos/Lindydancer/e2ansi/issues/5/events","html_url":"https://github.com/Lindydancer/e2ansi/issues/5","id":159307868,"number":5,"title":"Better command line option handling","user":{"login":"phil-s","id":295371,"avatar_url":"https://avatars.githubusercontent.com/u/295371?v=3","gravatar_id":"","url":"https://api.github.com/users/phil-s","html_url":"https://github.com/phil-s","followers_url":"https://api.github.com/users/phil-s/followers","following_url":"https://api.github.com/users/phil-s/following{/other_user}","gists_url":"https://api.github.com/users/phil-s/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-s/subscriptions","organizations_url":"https://api.github.com/users/phil-s/orgs","repos_url":"https://api.github.com/users/phil-s/repos","events_url":"https://api.github.com/users/phil-s/events{/privacy}","received_events_url":"https://api.github.com/users/phil-s/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-09T00:49:10Z","updated_at":"2016-06-09T05:44:55Z","closed_at":null,"body":"> Note, due to how Emacs parses options, some options passed to e2ansi-cat is parsed by Emacs. Most notably, passing the option --help to e2ansi-cat displays help for Emacs itself.\r\n\r\nYou can fix this, via the -- argument to Emacs.\r\n\r\nThere's a good overview in this article:\r\n\r\nhttp://www.lunaryorn.com/2014/08/12/emacs-script-pitfalls.html#processing-command-line-arguments\r\n\r\nWith everything combined, you end up with this:\r\n\r\n    #!/bin/sh\r\n    \":\"; exec emacs --quick --script \"$0\" -- \"$@\" # -*- mode: emacs-lisp; lexical-binding: t; -*-\r\n\r\n    (message \"Hello: %S\" argv)\r\n    (kill-emacs 0)\r\n\r\nWhere the -- means Emacs doesn't try to interpret the options it recognises, and the explicit kill-emacs ensures that Emacs doesn't try to visit any remaining arguments as files (you can also set argv to nil, but it's cleaner to exit rather than letting Emacs continue to do things).\r\n"},"comment":{"url":"https://api.github.com/repos/Lindydancer/e2ansi/issues/comments/224805291","html_url":"https://github.com/Lindydancer/e2ansi/issues/5#issuecomment-224805291","issue_url":"https://api.github.com/repos/Lindydancer/e2ansi/issues/5","id":224805291,"user":{"login":"phil-s","id":295371,"avatar_url":"https://avatars.githubusercontent.com/u/295371?v=3","gravatar_id":"","url":"https://api.github.com/users/phil-s","html_url":"https://github.com/phil-s","followers_url":"https://api.github.com/users/phil-s/followers","following_url":"https://api.github.com/users/phil-s/following{/other_user}","gists_url":"https://api.github.com/users/phil-s/gists{/gist_id}","starred_url":"https://api.github.com/users/phil-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phil-s/subscriptions","organizations_url":"https://api.github.com/users/phil-s/orgs","repos_url":"https://api.github.com/users/phil-s/repos","events_url":"https://api.github.com/users/phil-s/events{/privacy}","received_events_url":"https://api.github.com/users/phil-s/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T05:44:55Z","updated_at":"2016-06-09T05:44:55Z","body":"FWIW the \"sh hack\" is a matter of script portability, and not really Emacs' fault. See http://stackoverflow.com/a/6259330 for details."}}
{"actor":{"display_login":"phil-s"}}