{"action":"created","issue":{"url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/298","labels_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/298/comments","events_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/298/events","html_url":"https://github.com/bpinto/oh-my-fish/pull/298","id":53962979,"number":298,"title":"Improve array.delete","user":{"login":"bucaran","id":8317250,"avatar_url":"https://avatars.githubusercontent.com/u/8317250?v=3","gravatar_id":"","url":"https://api.github.com/users/bucaran","html_url":"https://github.com/bucaran","followers_url":"https://api.github.com/users/bucaran/followers","following_url":"https://api.github.com/users/bucaran/following{/other_user}","gists_url":"https://api.github.com/users/bucaran/gists{/gist_id}","starred_url":"https://api.github.com/users/bucaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bucaran/subscriptions","organizations_url":"https://api.github.com/users/bucaran/orgs","repos_url":"https://api.github.com/users/bucaran/repos","events_url":"https://api.github.com/users/bucaran/events{/privacy}","received_events_url":"https://api.github.com/users/bucaran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-10T16:27:03Z","updated_at":"2015-01-10T16:28:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bpinto/oh-my-fish/pulls/298","html_url":"https://github.com/bpinto/oh-my-fish/pull/298","diff_url":"https://github.com/bpinto/oh-my-fish/pull/298.diff","patch_url":"https://github.com/bpinto/oh-my-fish/pull/298.patch"},"body":"+ Rename `array.delete` to `list.erase` to better suit Fish terminology.\r\n+ Extend to support any number of items and/or lists.\r\n+ Add --from option."},"comment":{"url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/comments/69461589","html_url":"https://github.com/bpinto/oh-my-fish/pull/298#issuecomment-69461589","issue_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/298","id":69461589,"user":{"login":"bucaran","id":8317250,"avatar_url":"https://avatars.githubusercontent.com/u/8317250?v=3","gravatar_id":"","url":"https://api.github.com/users/bucaran","html_url":"https://github.com/bucaran","followers_url":"https://api.github.com/users/bucaran/followers","following_url":"https://api.github.com/users/bucaran/following{/other_user}","gists_url":"https://api.github.com/users/bucaran/gists{/gist_id}","starred_url":"https://api.github.com/users/bucaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bucaran/subscriptions","organizations_url":"https://api.github.com/users/bucaran/orgs","repos_url":"https://api.github.com/users/bucaran/repos","events_url":"https://api.github.com/users/bucaran/events{/privacy}","received_events_url":"https://api.github.com/users/bucaran/received_events","type":"User","site_admin":false},"created_at":"2015-01-10T16:28:01Z","updated_at":"2015-01-10T16:28:01Z","body":"You can fully test it here.\r\n\r\n```fish\r\nfunction list.erase.test\r\n  function list.erase.test.default\r\n    set -l nums 1 2 3 4 5 6 7 8 9 10 11 12\r\n    set -l odds 1 3 5 7 9 11\r\n\r\n    list.erase 12 nums\r\n    contains -- 12 $nums\r\n      and return 1\r\n\r\n    list.erase 8 10 nums\r\n    contains -- 8 $nums\r\n      and return 1\r\n    contains -- 10 $nums\r\n      and return 1\r\n\r\n    list.erase 2 --from nums\r\n    contains -- 2 $nums\r\n      and return 1\r\n\r\n    list.erase 4 6 --from nums\r\n    contains -- 4 $nums\r\n      and return 1\r\n    contains -- 6 $nums\r\n      and return 1\r\n\r\n    list.erase 1 --from nums odds\r\n    contains -- 1 $nums\r\n      and return 1\r\n    contains -- 1 $odds\r\n      and return 1\r\n\r\n    list.erase 3 5 7 9 11 --from nums odds\r\n    test -n \"$nums\"\r\n      and return 1\r\n    test -n \"$odds\"\r\n      and return 1\r\n    return 0 # Success\r\n  end\r\n  list.erase.test.default\r\n    and echo ✔\r\n    or echo ✘\r\nend\r\n```"}}