{"action":"created","issue":{"url":"https://api.github.com/repos/vert-x3/vertx-shell/issues/35","repository_url":"https://api.github.com/repos/vert-x3/vertx-shell","labels_url":"https://api.github.com/repos/vert-x3/vertx-shell/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/vert-x3/vertx-shell/issues/35/comments","events_url":"https://api.github.com/repos/vert-x3/vertx-shell/issues/35/events","html_url":"https://github.com/vert-x3/vertx-shell/pull/35","id":336691860,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MDg0Nzg1","number":35,"title":"Make setting the prompt available from ShellServer via a shellHandler.","user":{"login":"andrm","id":362342,"node_id":"MDQ6VXNlcjM2MjM0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/362342?v=4","gravatar_id":"","url":"https://api.github.com/users/andrm","html_url":"https://github.com/andrm","followers_url":"https://api.github.com/users/andrm/followers","following_url":"https://api.github.com/users/andrm/following{/other_user}","gists_url":"https://api.github.com/users/andrm/gists{/gist_id}","starred_url":"https://api.github.com/users/andrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrm/subscriptions","organizations_url":"https://api.github.com/users/andrm/orgs","repos_url":"https://api.github.com/users/andrm/repos","events_url":"https://api.github.com/users/andrm/events{/privacy}","received_events_url":"https://api.github.com/users/andrm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/vert-x3/vertx-shell/milestones/1","html_url":"https://github.com/vert-x3/vertx-shell/milestone/1","labels_url":"https://api.github.com/repos/vert-x3/vertx-shell/milestones/1/labels","id":3447177,"node_id":"MDk6TWlsZXN0b25lMzQ0NzE3Nw==","number":1,"title":"3.6.0","description":null,"creator":{"login":"vietj","id":225674,"node_id":"MDQ6VXNlcjIyNTY3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/225674?v=4","gravatar_id":"","url":"https://api.github.com/users/vietj","html_url":"https://github.com/vietj","followers_url":"https://api.github.com/users/vietj/followers","following_url":"https://api.github.com/users/vietj/following{/other_user}","gists_url":"https://api.github.com/users/vietj/gists{/gist_id}","starred_url":"https://api.github.com/users/vietj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vietj/subscriptions","organizations_url":"https://api.github.com/users/vietj/orgs","repos_url":"https://api.github.com/users/vietj/repos","events_url":"https://api.github.com/users/vietj/events{/privacy}","received_events_url":"https://api.github.com/users/vietj/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2018-06-24T16:04:19Z","updated_at":"2018-07-20T16:53:32Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2018-06-28T16:25:04Z","updated_at":"2018-07-20T16:53:44Z","closed_at":"2018-07-20T16:53:26Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/vert-x3/vertx-shell/pulls/35","html_url":"https://github.com/vert-x3/vertx-shell/pull/35","diff_url":"https://github.com/vert-x3/vertx-shell/pull/35.diff","patch_url":"https://github.com/vert-x3/vertx-shell/pull/35.patch"},"body":"This works now.\r\n\r\n    ShellServer server = ShellServer.create(vertx);\r\n    AtomicInteger ai = new AtomicInteger(0);\r\n    server.shellHandler(shell -> {\r\n      shell.setPrompt(s -> {\r\n        try {\r\n          return \"C: \" + ai.incrementAndGet();\r\n        } catch (Exception e) {\r\n          System.err.println(\"Counter\");\r\n          e.printStackTrace();\r\n        }\r\n        return \"NOOP\";\r\n      });\r\n    });\r\n    TelnetTermOptions tto = new TelnetTermOptions().setPort(3000).setHost(\"localhost\");\r\n    TermServer telnetTermServer = TermServer.createTelnetTermServer(vertx,tto);\r\n    server.registerTermServer(telnetTermServer);\r\n\r\n    server.registerCommandResolver(CommandResolver.baseCommands(vertx));\r\n\r\n    server.listen(ar -> {\r\n      if (!ar.succeeded()) {\r\n        ar.cause().printStackTrace();\r\n      }\r\n    });"},"comment":{"url":"https://api.github.com/repos/vert-x3/vertx-shell/issues/comments/406660819","html_url":"https://github.com/vert-x3/vertx-shell/pull/35#issuecomment-406660819","issue_url":"https://api.github.com/repos/vert-x3/vertx-shell/issues/35","id":406660819,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjY2MDgxOQ==","user":{"login":"vietj","id":225674,"node_id":"MDQ6VXNlcjIyNTY3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/225674?v=4","gravatar_id":"","url":"https://api.github.com/users/vietj","html_url":"https://github.com/vietj","followers_url":"https://api.github.com/users/vietj/followers","following_url":"https://api.github.com/users/vietj/following{/other_user}","gists_url":"https://api.github.com/users/vietj/gists{/gist_id}","starred_url":"https://api.github.com/users/vietj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vietj/subscriptions","organizations_url":"https://api.github.com/users/vietj/orgs","repos_url":"https://api.github.com/users/vietj/repos","events_url":"https://api.github.com/users/vietj/events{/privacy}","received_events_url":"https://api.github.com/users/vietj/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T16:53:44Z","updated_at":"2018-07-20T16:53:44Z","author_association":"CONTRIBUTOR","body":"thanks for the contribution!"}}
{"actor":{"display_login":"vietj"}}