{"action":"created","issue":{"url":"https://api.github.com/repos/tj/n/issues/371","repository_url":"https://api.github.com/repos/tj/n","labels_url":"https://api.github.com/repos/tj/n/issues/371/labels{/name}","comments_url":"https://api.github.com/repos/tj/n/issues/371/comments","events_url":"https://api.github.com/repos/tj/n/issues/371/events","html_url":"https://github.com/tj/n/pull/371","id":175781182,"number":371,"title":"Resolve versions with no dots","user":{"login":"MiniGod","id":60520,"avatar_url":"https://avatars.githubusercontent.com/u/60520?v=3","gravatar_id":"","url":"https://api.github.com/users/MiniGod","html_url":"https://github.com/MiniGod","followers_url":"https://api.github.com/users/MiniGod/followers","following_url":"https://api.github.com/users/MiniGod/following{/other_user}","gists_url":"https://api.github.com/users/MiniGod/gists{/gist_id}","starred_url":"https://api.github.com/users/MiniGod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MiniGod/subscriptions","organizations_url":"https://api.github.com/users/MiniGod/orgs","repos_url":"https://api.github.com/users/MiniGod/repos","events_url":"https://api.github.com/users/MiniGod/events{/privacy}","received_events_url":"https://api.github.com/users/MiniGod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-08T15:14:20Z","updated_at":"2016-09-08T15:57:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tj/n/pulls/371","html_url":"https://github.com/tj/n/pull/371","diff_url":"https://github.com/tj/n/pull/371.diff","patch_url":"https://github.com/tj/n/pull/371.patch"},"body":"Before:\r\n\r\n```\r\n$ node -v\r\nv4.5.0\r\n$ n 6\r\n\r\n     install : node-v6\r\n\r\n  Error: invalid version 6\r\n\r\n$ node -v\r\nv4.5.0\r\n```\r\n\r\nAfter:\r\n\r\n```\r\n$ node -v\r\nv4.5.0\r\n$ n 6\r\n\r\n     install : node-v6.5.0\r\n       mkdir : /home/user/n/n/versions/node/6.5.0\r\n       fetch : https://nodejs.org/dist/v6.5.0/node-v6.5.0-linux-x64.tar.gz\r\n######################################################################## 100.0%\r\n   installed : v6.5.0\r\n\r\n$ node -v\r\nv6.5.0\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/tj/n/issues/comments/245645790","html_url":"https://github.com/tj/n/pull/371#issuecomment-245645790","issue_url":"https://api.github.com/repos/tj/n/issues/371","id":245645790,"user":{"login":"qw3rtman","id":1139621,"avatar_url":"https://avatars.githubusercontent.com/u/1139621?v=3","gravatar_id":"","url":"https://api.github.com/users/qw3rtman","html_url":"https://github.com/qw3rtman","followers_url":"https://api.github.com/users/qw3rtman/followers","following_url":"https://api.github.com/users/qw3rtman/following{/other_user}","gists_url":"https://api.github.com/users/qw3rtman/gists{/gist_id}","starred_url":"https://api.github.com/users/qw3rtman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qw3rtman/subscriptions","organizations_url":"https://api.github.com/users/qw3rtman/orgs","repos_url":"https://api.github.com/users/qw3rtman/repos","events_url":"https://api.github.com/users/qw3rtman/events{/privacy}","received_events_url":"https://api.github.com/users/qw3rtman/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T15:57:07Z","updated_at":"2016-09-08T15:57:07Z","body":"One issue this could lead to, as seen in the example provided, is installing a version of Node the user wasn't expecting. Typing `n 6`, a user may expect to install `Node v6.0.0` (i.e: `n 6` is shorthand for `n 6.0.0`).\r\n\r\nI think the behavior should be as follows.\r\n\r\n```sh\r\nn 6 # n 6.0.0\r\nn 6.0 # n 6.0.0\r\nn 6.5 # n 6.5.0\r\n```\r\n\r\nPerhaps if this checks if, after adding the required `.0`'s, the versions are the same, it would be more predictable."}}
{"actor":{"display_login":"qw3rtman"}}