{"action":"created","issue":{"url":"https://api.github.com/repos/dthree/vorpal/issues/14","labels_url":"https://api.github.com/repos/dthree/vorpal/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/dthree/vorpal/issues/14/comments","events_url":"https://api.github.com/repos/dthree/vorpal/issues/14/events","html_url":"https://github.com/dthree/vorpal/issues/14","id":110772832,"number":14,"title":"Using arrow functions","user":{"login":"bestguy","id":405608,"avatar_url":"https://avatars.githubusercontent.com/u/405608?v=3","gravatar_id":"","url":"https://api.github.com/users/bestguy","html_url":"https://github.com/bestguy","followers_url":"https://api.github.com/users/bestguy/followers","following_url":"https://api.github.com/users/bestguy/following{/other_user}","gists_url":"https://api.github.com/users/bestguy/gists{/gist_id}","starred_url":"https://api.github.com/users/bestguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestguy/subscriptions","organizations_url":"https://api.github.com/users/bestguy/orgs","repos_url":"https://api.github.com/users/bestguy/repos","events_url":"https://api.github.com/users/bestguy/events{/privacy}","received_events_url":"https://api.github.com/users/bestguy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dthree/vorpal/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/dthree/vorpal/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-10T06:14:05Z","updated_at":"2015-10-10T07:33:42Z","closed_at":null,"body":"Trying out ES6 arrow functions with Vorpal, but the `session` normally available via `this` does not work of course:\r\n\r\n```\r\nvorpal\r\n  .command('foo')\r\n  .description('Outputs \"bar\".')\r\n  .action((args, callback) => {\r\n    this.log('bar'); // ReferenceError: log is not defined\r\n    callback();\r\n  });```\r\n\r\nThough what we be the best way to use vorpal with arrow functions?"},"comment":{"url":"https://api.github.com/repos/dthree/vorpal/issues/comments/147049073","html_url":"https://github.com/dthree/vorpal/issues/14#issuecomment-147049073","issue_url":"https://api.github.com/repos/dthree/vorpal/issues/14","id":147049073,"user":{"login":"AljoschaMeyer","id":12977795,"avatar_url":"https://avatars.githubusercontent.com/u/12977795?v=3","gravatar_id":"","url":"https://api.github.com/users/AljoschaMeyer","html_url":"https://github.com/AljoschaMeyer","followers_url":"https://api.github.com/users/AljoschaMeyer/followers","following_url":"https://api.github.com/users/AljoschaMeyer/following{/other_user}","gists_url":"https://api.github.com/users/AljoschaMeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/AljoschaMeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AljoschaMeyer/subscriptions","organizations_url":"https://api.github.com/users/AljoschaMeyer/orgs","repos_url":"https://api.github.com/users/AljoschaMeyer/repos","events_url":"https://api.github.com/users/AljoschaMeyer/events{/privacy}","received_events_url":"https://api.github.com/users/AljoschaMeyer/received_events","type":"User","site_admin":false},"created_at":"2015-10-10T07:33:42Z","updated_at":"2015-10-10T07:33:42Z","body":"> Right now, the session is only exposed within the action, there's really no external reference.\r\n\r\nI've been using `vorpal.session.log('foo')`, which seemed to work. Anything I'm missing?"}}