{"action":"created","issue":{"url":"https://api.github.com/repos/rbenv/rbenv/issues/857","labels_url":"https://api.github.com/repos/rbenv/rbenv/issues/857/labels{/name}","comments_url":"https://api.github.com/repos/rbenv/rbenv/issues/857/comments","events_url":"https://api.github.com/repos/rbenv/rbenv/issues/857/events","html_url":"https://github.com/rbenv/rbenv/pull/857","id":126251036,"number":857,"title":"WIP add support for rbenv shell -","user":{"login":"tenderlove","id":3124,"avatar_url":"https://avatars.githubusercontent.com/u/3124?v=3","gravatar_id":"","url":"https://api.github.com/users/tenderlove","html_url":"https://github.com/tenderlove","followers_url":"https://api.github.com/users/tenderlove/followers","following_url":"https://api.github.com/users/tenderlove/following{/other_user}","gists_url":"https://api.github.com/users/tenderlove/gists{/gist_id}","starred_url":"https://api.github.com/users/tenderlove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenderlove/subscriptions","organizations_url":"https://api.github.com/users/tenderlove/orgs","repos_url":"https://api.github.com/users/tenderlove/repos","events_url":"https://api.github.com/users/tenderlove/events{/privacy}","received_events_url":"https://api.github.com/users/tenderlove/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-12T19:04:13Z","updated_at":"2016-01-13T00:03:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rbenv/rbenv/pulls/857","html_url":"https://github.com/rbenv/rbenv/pull/857","diff_url":"https://github.com/rbenv/rbenv/pull/857.diff","patch_url":"https://github.com/rbenv/rbenv/pull/857.patch"},"body":"This tries to implement `rbenv shell -` as proposed in #854.  However,\r\nadding support seemed to break the \"shell change version\" test.  I'm not\r\nvery good at Bash programming, can someone tell me what is wrong with\r\nwhat I'm doing?  I'd like to add a bit more functionality to this, but\r\nI'm really just cargo cult programming Bash.\r\n\r\nThank you!"},"comment":{"url":"https://api.github.com/repos/rbenv/rbenv/issues/comments/171105459","html_url":"https://github.com/rbenv/rbenv/pull/857#issuecomment-171105459","issue_url":"https://api.github.com/repos/rbenv/rbenv/issues/857","id":171105459,"user":{"login":"tenderlove","id":3124,"avatar_url":"https://avatars.githubusercontent.com/u/3124?v=3","gravatar_id":"","url":"https://api.github.com/users/tenderlove","html_url":"https://github.com/tenderlove","followers_url":"https://api.github.com/users/tenderlove/followers","following_url":"https://api.github.com/users/tenderlove/following{/other_user}","gists_url":"https://api.github.com/users/tenderlove/gists{/gist_id}","starred_url":"https://api.github.com/users/tenderlove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenderlove/subscriptions","organizations_url":"https://api.github.com/users/tenderlove/orgs","repos_url":"https://api.github.com/users/tenderlove/repos","events_url":"https://api.github.com/users/tenderlove/events{/privacy}","received_events_url":"https://api.github.com/users/tenderlove/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T00:03:46Z","updated_at":"2016-01-13T00:03:46Z","body":"I've updated my PR to be a bit better (and have passing tests).  The main issue right now (and I *think* the issue that @mislav was trying to get at in #854) is what to do when nobody has executed `rbenv shell` yet.\r\n\r\nFor example, I open the terminal and do:\r\n\r\n```\r\nLast login: Tue Jan 12 15:44:07 on ttys008\r\n[aaron@TC ~]$ which ruby\r\n/Users/aaron/.rbenv/shims/ruby\r\n[aaron@TC ~]$ ruby -v\r\nruby 2.4.0dev (2016-01-11 trunk 53499) [x86_64-darwin15]\r\n[aaron@TC ~]$ rbenv shell 2.3.0\r\n[aaron@TC ~]$ ruby -v\r\nruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]\r\n[aaron@TC ~]$ rbenv shell -\r\nrbenv: OLD_RBENV_VERSION not set\r\n[aaron@TC ~]$\r\n```\r\n\r\nI'd *expect* the above interaction to work and switch me back to `2.4.0`.  I gather that `RBENV_VERSION` is not set when I open the shell.  Is this by design?  Should we call this commit \"good\" and expect people to set `RBENV_VERSION` themselves?  FWIW, I usually do `rbenv shell ruby-trunk`, so I don't have a particular version and I don't mind setting the environment variable myself in the bashrc.\r\n\r\n@mislav do you have any advice for me?\r\n\r\n(Side note, I need to clean up the commit message so please don't merge this yet)"}}