{"action":"created","issue":{"url":"https://api.github.com/repos/pry/pry/issues/1485","labels_url":"https://api.github.com/repos/pry/pry/issues/1485/labels{/name}","comments_url":"https://api.github.com/repos/pry/pry/issues/1485/comments","events_url":"https://api.github.com/repos/pry/pry/issues/1485/events","html_url":"https://github.com/pry/pry/pull/1485","id":113616010,"number":1485,"title":"Support after_exit hook","user":{"login":"k0kubun","id":3138447,"avatar_url":"https://avatars.githubusercontent.com/u/3138447?v=3","gravatar_id":"","url":"https://api.github.com/users/k0kubun","html_url":"https://github.com/k0kubun","followers_url":"https://api.github.com/users/k0kubun/followers","following_url":"https://api.github.com/users/k0kubun/following{/other_user}","gists_url":"https://api.github.com/users/k0kubun/gists{/gist_id}","starred_url":"https://api.github.com/users/k0kubun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k0kubun/subscriptions","organizations_url":"https://api.github.com/users/k0kubun/orgs","repos_url":"https://api.github.com/users/k0kubun/repos","events_url":"https://api.github.com/users/k0kubun/events{/privacy}","received_events_url":"https://api.github.com/users/k0kubun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-27T15:49:44Z","updated_at":"2015-10-27T16:09:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pry/pry/pulls/1485","html_url":"https://github.com/pry/pry/pull/1485","diff_url":"https://github.com/pry/pry/pull/1485.diff","patch_url":"https://github.com/pry/pry/pull/1485.patch"},"body":"I want to execute a hook after execution of `exit` or `quit` (not all `:after_session`). Since `exit` command throws `:breakout` in `exit-all`, `Pry::Command#call_with_hooks` doesn't call `instance_exec` for `after_hooks`.\r\n\r\nIs there any way to do it without this patch?"},"comment":{"url":"https://api.github.com/repos/pry/pry/issues/comments/151553409","html_url":"https://github.com/pry/pry/pull/1485#issuecomment-151553409","issue_url":"https://api.github.com/repos/pry/pry/issues/1485","id":151553409,"user":{"login":"strcmp","id":8934693,"avatar_url":"https://avatars.githubusercontent.com/u/8934693?v=3","gravatar_id":"","url":"https://api.github.com/users/strcmp","html_url":"https://github.com/strcmp","followers_url":"https://api.github.com/users/strcmp/followers","following_url":"https://api.github.com/users/strcmp/following{/other_user}","gists_url":"https://api.github.com/users/strcmp/gists{/gist_id}","starred_url":"https://api.github.com/users/strcmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strcmp/subscriptions","organizations_url":"https://api.github.com/users/strcmp/orgs","repos_url":"https://api.github.com/users/strcmp/repos","events_url":"https://api.github.com/users/strcmp/events{/privacy}","received_events_url":"https://api.github.com/users/strcmp/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T16:09:45Z","updated_at":"2015-10-27T16:09:45Z","body":"it is correct that `exit-all` command will throw a `:breakout` symbol to interrupt the repl loop and return control to the caller of the `binding.pry` call or Pry.start, etc, and it may not be only the command that does. any pry command can throw it to basically terminate a repl session.\r\n"}}