{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4965","repository_url":"https://api.github.com/repos/fish-shell/fish-shell","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4965/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4965/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4965/events","html_url":"https://github.com/fish-shell/fish-shell/pull/4965","id":321163277,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg2NjE2NDgy","number":4965,"title":"Fix range expansion with negative ends","user":{"login":"faho","id":5185367,"node_id":"MDQ6VXNlcjUxODUzNjc=","avatar_url":"https://avatars3.githubusercontent.com/u/5185367?v=4","gravatar_id":"","url":"https://api.github.com/users/faho","html_url":"https://github.com/faho","followers_url":"https://api.github.com/users/faho/followers","following_url":"https://api.github.com/users/faho/following{/other_user}","gists_url":"https://api.github.com/users/faho/gists{/gist_id}","starred_url":"https://api.github.com/users/faho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faho/subscriptions","organizations_url":"https://api.github.com/users/faho/orgs","repos_url":"https://api.github.com/users/faho/repos","events_url":"https://api.github.com/users/faho/events{/privacy}","received_events_url":"https://api.github.com/users/faho/received_events","type":"User","site_admin":false},"labels":[{"id":402356383,"node_id":"MDU6TGFiZWw0MDIzNTYzODM=","url":"https://api.github.com/repos/fish-shell/fish-shell/labels/RFC","name":"RFC","color":"ffefe5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/18","html_url":"https://github.com/fish-shell/fish-shell/milestone/18","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/18/labels","id":2597361,"node_id":"MDk6TWlsZXN0b25lMjU5NzM2MQ==","number":18,"title":"fish-3.0","description":"The proposed 3.0 major release of fish. May contain breaking changes.","creator":{"login":"faho","id":5185367,"node_id":"MDQ6VXNlcjUxODUzNjc=","avatar_url":"https://avatars3.githubusercontent.com/u/5185367?v=4","gravatar_id":"","url":"https://api.github.com/users/faho","html_url":"https://github.com/faho","followers_url":"https://api.github.com/users/faho/followers","following_url":"https://api.github.com/users/faho/following{/other_user}","gists_url":"https://api.github.com/users/faho/gists{/gist_id}","starred_url":"https://api.github.com/users/faho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faho/subscriptions","organizations_url":"https://api.github.com/users/faho/orgs","repos_url":"https://api.github.com/users/faho/repos","events_url":"https://api.github.com/users/faho/events{/privacy}","received_events_url":"https://api.github.com/users/faho/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":283,"state":"open","created_at":"2017-06-22T00:28:56Z","updated_at":"2018-06-05T14:36:24Z","due_on":"2018-04-01T07:00:00Z","closed_at":null},"comments":5,"created_at":"2018-05-08T12:21:02Z","updated_at":"2018-06-05T19:40:09Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/4965","html_url":"https://github.com/fish-shell/fish-shell/pull/4965","diff_url":"https://github.com/fish-shell/fish-shell/pull/4965.diff","patch_url":"https://github.com/fish-shell/fish-shell/pull/4965.patch"},"body":"If just one of the range ends is negative, this now forces direction away from it.\r\n\r\nI.e. if the beginning is negative, we go in reverse.\r\nIf the end is negative, we go forwards.\r\n\r\nThis fixes cases like\r\n\r\n    $var[2..-1]\r\n\r\nif $var only has one element.\r\n\r\nIf this gets enough testing quickly, I'd still love to include it in 3.0.\r\n\r\nFixes issue #4897.\r\n\r\n## TODOs:\r\n<!-- Just check off what what we know been done so far. We can help you with this stuff. -->\r\n- [ ] Changes to fish usage are reflected in user documentation/manpages.\r\n- [X] Tests have been added for regressions fixed\r\n- [ ] User-visible changes noted in CHANGELOG.md\r\n"},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/394834811","html_url":"https://github.com/fish-shell/fish-shell/pull/4965#issuecomment-394834811","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4965","id":394834811,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDgzNDgxMQ==","user":{"login":"faho","id":5185367,"node_id":"MDQ6VXNlcjUxODUzNjc=","avatar_url":"https://avatars3.githubusercontent.com/u/5185367?v=4","gravatar_id":"","url":"https://api.github.com/users/faho","html_url":"https://github.com/faho","followers_url":"https://api.github.com/users/faho/followers","following_url":"https://api.github.com/users/faho/following{/other_user}","gists_url":"https://api.github.com/users/faho/gists{/gist_id}","starred_url":"https://api.github.com/users/faho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faho/subscriptions","organizations_url":"https://api.github.com/users/faho/orgs","repos_url":"https://api.github.com/users/faho/repos","events_url":"https://api.github.com/users/faho/events{/privacy}","received_events_url":"https://api.github.com/users/faho/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T19:40:09Z","updated_at":"2018-06-05T19:40:09Z","author_association":"MEMBER","body":">but what about -4,-2?\r\n\r\nThat has both negative, so this PR changes nothing.\r\n\r\nIt still goes forward, because \"-4\" is a smaller element than \"-2\".\r\n\r\nJust like `4,2` will still go backwards because \"4\" is larger than \"2\"."}}
{"actor":{"display_login":"faho"}}