{"action":"opened","number":2402,"pull_request":{"url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2402","id":45392341,"html_url":"https://github.com/fish-shell/fish-shell/pull/2402","diff_url":"https://github.com/fish-shell/fish-shell/pull/2402.diff","patch_url":"https://github.com/fish-shell/fish-shell/pull/2402.patch","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2402","number":2402,"state":"open","locked":false,"title":"git completion: Bring needs_command in line with git","user":{"login":"faho","id":5185367,"avatar_url":"https://avatars.githubusercontent.com/u/5185367?v=3","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},"body":"git has options that can appear before commands, but not all of\r\nthem, and some of them need an argument. This means\r\n`__fish_seen_subcommand_from`  will give too many false-positives, while\r\n`[ (count $cmd) -eq 2 ]` will give too many false-negatives.\r\n\r\nInstead go through all arguments and check if they are in that list of\r\noptions that can be before a command and skip the argument for them, if\r\nany.\r\n\r\n@ridiculousfish: Is this too slow on your system as well?","created_at":"2015-09-18T10:41:34Z","updated_at":"2015-09-18T10:41:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9c2bae7b60b9a3e1d0c55107a715bc09d712599","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2402/commits","review_comments_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2402/comments","review_comment_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/2402/comments","statuses_url":"https://api.github.com/repos/fish-shell/fish-shell/statuses/cfe2725c7d80206046179e4eb32d7440c5fc175f","head":{"label":"faho:git-take-2","ref":"git-take-2","sha":"cfe2725c7d80206046179e4eb32d7440c5fc175f","user":{"login":"faho","id":5185367,"avatar_url":"https://avatars.githubusercontent.com/u/5185367?v=3","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},"repo":{"id":30829101,"name":"fish-shell","full_name":"faho/fish-shell","owner":{"login":"faho","id":5185367,"avatar_url":"https://avatars.githubusercontent.com/u/5185367?v=3","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},"private":false,"html_url":"https://github.com/faho/fish-shell","description":"The user-friendly command line shell.","fork":true,"url":"https://api.github.com/repos/faho/fish-shell","forks_url":"https://api.github.com/repos/faho/fish-shell/forks","keys_url":"https://api.github.com/repos/faho/fish-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faho/fish-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faho/fish-shell/teams","hooks_url":"https://api.github.com/repos/faho/fish-shell/hooks","issue_events_url":"https://api.github.com/repos/faho/fish-shell/issues/events{/number}","events_url":"https://api.github.com/repos/faho/fish-shell/events","assignees_url":"https://api.github.com/repos/faho/fish-shell/assignees{/user}","branches_url":"https://api.github.com/repos/faho/fish-shell/branches{/branch}","tags_url":"https://api.github.com/repos/faho/fish-shell/tags","blobs_url":"https://api.github.com/repos/faho/fish-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faho/fish-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faho/fish-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/faho/fish-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faho/fish-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/faho/fish-shell/languages","stargazers_url":"https://api.github.com/repos/faho/fish-shell/stargazers","contributors_url":"https://api.github.com/repos/faho/fish-shell/contributors","subscribers_url":"https://api.github.com/repos/faho/fish-shell/subscribers","subscription_url":"https://api.github.com/repos/faho/fish-shell/subscription","commits_url":"https://api.github.com/repos/faho/fish-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/faho/fish-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/faho/fish-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/faho/fish-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/faho/fish-shell/contents/{+path}","compare_url":"https://api.github.com/repos/faho/fish-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faho/fish-shell/merges","archive_url":"https://api.github.com/repos/faho/fish-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faho/fish-shell/downloads","issues_url":"https://api.github.com/repos/faho/fish-shell/issues{/number}","pulls_url":"https://api.github.com/repos/faho/fish-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/faho/fish-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/faho/fish-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faho/fish-shell/labels{/name}","releases_url":"https://api.github.com/repos/faho/fish-shell/releases{/id}","created_at":"2015-02-15T14:08:06Z","updated_at":"2015-06-21T16:28:44Z","pushed_at":"2015-09-18T10:40:11Z","git_url":"git://github.com/faho/fish-shell.git","ssh_url":"git@github.com:faho/fish-shell.git","clone_url":"https://github.com/faho/fish-shell.git","svn_url":"https://github.com/faho/fish-shell","homepage":"http://fishshell.com","size":27340,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fish-shell:master","ref":"master","sha":"be70ea7d49af3cf5bb09116bc278d994fd0cd00c","user":{"login":"fish-shell","id":1828073,"avatar_url":"https://avatars.githubusercontent.com/u/1828073?v=3","gravatar_id":"","url":"https://api.github.com/users/fish-shell","html_url":"https://github.com/fish-shell","followers_url":"https://api.github.com/users/fish-shell/followers","following_url":"https://api.github.com/users/fish-shell/following{/other_user}","gists_url":"https://api.github.com/users/fish-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/fish-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fish-shell/subscriptions","organizations_url":"https://api.github.com/users/fish-shell/orgs","repos_url":"https://api.github.com/users/fish-shell/repos","events_url":"https://api.github.com/users/fish-shell/events{/privacy}","received_events_url":"https://api.github.com/users/fish-shell/received_events","type":"Organization","site_admin":false},"repo":{"id":4279682,"name":"fish-shell","full_name":"fish-shell/fish-shell","owner":{"login":"fish-shell","id":1828073,"avatar_url":"https://avatars.githubusercontent.com/u/1828073?v=3","gravatar_id":"","url":"https://api.github.com/users/fish-shell","html_url":"https://github.com/fish-shell","followers_url":"https://api.github.com/users/fish-shell/followers","following_url":"https://api.github.com/users/fish-shell/following{/other_user}","gists_url":"https://api.github.com/users/fish-shell/gists{/gist_id}","starred_url":"https://api.github.com/users/fish-shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fish-shell/subscriptions","organizations_url":"https://api.github.com/users/fish-shell/orgs","repos_url":"https://api.github.com/users/fish-shell/repos","events_url":"https://api.github.com/users/fish-shell/events{/privacy}","received_events_url":"https://api.github.com/users/fish-shell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fish-shell/fish-shell","description":"The user-friendly command line shell.","fork":false,"url":"https://api.github.com/repos/fish-shell/fish-shell","forks_url":"https://api.github.com/repos/fish-shell/fish-shell/forks","keys_url":"https://api.github.com/repos/fish-shell/fish-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fish-shell/fish-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fish-shell/fish-shell/teams","hooks_url":"https://api.github.com/repos/fish-shell/fish-shell/hooks","issue_events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/events{/number}","events_url":"https://api.github.com/repos/fish-shell/fish-shell/events","assignees_url":"https://api.github.com/repos/fish-shell/fish-shell/assignees{/user}","branches_url":"https://api.github.com/repos/fish-shell/fish-shell/branches{/branch}","tags_url":"https://api.github.com/repos/fish-shell/fish-shell/tags","blobs_url":"https://api.github.com/repos/fish-shell/fish-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fish-shell/fish-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fish-shell/fish-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/fish-shell/fish-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fish-shell/fish-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/fish-shell/fish-shell/languages","stargazers_url":"https://api.github.com/repos/fish-shell/fish-shell/stargazers","contributors_url":"https://api.github.com/repos/fish-shell/fish-shell/contributors","subscribers_url":"https://api.github.com/repos/fish-shell/fish-shell/subscribers","subscription_url":"https://api.github.com/repos/fish-shell/fish-shell/subscription","commits_url":"https://api.github.com/repos/fish-shell/fish-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/fish-shell/fish-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/fish-shell/fish-shell/contents/{+path}","compare_url":"https://api.github.com/repos/fish-shell/fish-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fish-shell/fish-shell/merges","archive_url":"https://api.github.com/repos/fish-shell/fish-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fish-shell/fish-shell/downloads","issues_url":"https://api.github.com/repos/fish-shell/fish-shell/issues{/number}","pulls_url":"https://api.github.com/repos/fish-shell/fish-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/fish-shell/fish-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/labels{/name}","releases_url":"https://api.github.com/repos/fish-shell/fish-shell/releases{/id}","created_at":"2012-05-10T03:00:55Z","updated_at":"2015-09-18T07:55:03Z","pushed_at":"2015-09-18T10:41:35Z","git_url":"git://github.com/fish-shell/fish-shell.git","ssh_url":"git@github.com:fish-shell/fish-shell.git","clone_url":"https://github.com/fish-shell/fish-shell.git","svn_url":"https://github.com/fish-shell/fish-shell","homepage":"http://fishshell.com","size":40056,"stargazers_count":4646,"watchers_count":4646,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":443,"mirror_url":null,"open_issues_count":610,"forks":443,"open_issues":610,"watchers":4646,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2402"},"html":{"href":"https://github.com/fish-shell/fish-shell/pull/2402"},"issue":{"href":"https://api.github.com/repos/fish-shell/fish-shell/issues/2402"},"comments":{"href":"https://api.github.com/repos/fish-shell/fish-shell/issues/2402/comments"},"review_comments":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2402/comments"},"review_comment":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fish-shell/fish-shell/pulls/2402/commits"},"statuses":{"href":"https://api.github.com/repos/fish-shell/fish-shell/statuses/cfe2725c7d80206046179e4eb32d7440c5fc175f"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":26,"deletions":1,"changed_files":1}}