{"action":"created","issue":{"url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/296","labels_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/296/comments","events_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/296/events","html_url":"https://github.com/bpinto/oh-my-fish/pull/296","id":53956570,"number":296,"title":"Simplify remove_from_array function to use builtin contains command.","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":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-10T12:20:04Z","updated_at":"2015-01-10T16:27:05Z","closed_at":"2015-01-10T14:05:39Z","pull_request":{"url":"https://api.github.com/repos/bpinto/oh-my-fish/pulls/296","html_url":"https://github.com/bpinto/oh-my-fish/pull/296","diff_url":"https://github.com/bpinto/oh-my-fish/pull/296.diff","patch_url":"https://github.com/bpinto/oh-my-fish/pull/296.patch"},"body":"Better off using the builtin contains, me thinks.\r\n\r\n```fish\r\n# Remove item from list. List must be the name of a global variable.\r\n# @params <item> <list>\r\nfunction remove_from_array\r\n  set -l item $argv[1]\r\n  if set -l index (contains -i -- $item $$argv[2])\r\n    set -e $argv[2][$index]\r\n  end\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/comments/69461557","html_url":"https://github.com/bpinto/oh-my-fish/pull/296#issuecomment-69461557","issue_url":"https://api.github.com/repos/bpinto/oh-my-fish/issues/296","id":69461557,"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:27:05Z","updated_at":"2015-01-10T16:27:05Z","body":"Just pushed a new version. It's pretty cool. A few comments, AFIK the correct terminology in fish to refer to arrays is _lists_, so I renamed it to `list.erase`.  We are using `set -e --erase` anyway.\r\n"}}