{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4174","repository_url":"https://api.github.com/repos/fish-shell/fish-shell","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4174/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4174/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4174/events","html_url":"https://github.com/fish-shell/fish-shell/issues/4174","id":239964691,"number":4174,"title":"Support clang's new shell autocompletion feature","user":{"login":"Teemperor","id":736001,"avatar_url":"https://avatars0.githubusercontent.com/u/736001?v=4","gravatar_id":"","url":"https://api.github.com/users/Teemperor","html_url":"https://github.com/Teemperor","followers_url":"https://api.github.com/users/Teemperor/followers","following_url":"https://api.github.com/users/Teemperor/following{/other_user}","gists_url":"https://api.github.com/users/Teemperor/gists{/gist_id}","starred_url":"https://api.github.com/users/Teemperor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teemperor/subscriptions","organizations_url":"https://api.github.com/users/Teemperor/orgs","repos_url":"https://api.github.com/users/Teemperor/repos","events_url":"https://api.github.com/users/Teemperor/events{/privacy}","received_events_url":"https://api.github.com/users/Teemperor/received_events","type":"User","site_admin":false},"labels":[{"id":252196718,"url":"https://api.github.com/repos/fish-shell/fish-shell/labels/completions","name":"completions","color":"E6C0E5","default":false},{"id":4724778,"url":"https://api.github.com/repos/fish-shell/fish-shell/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"faho","id":5185367,"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},"assignees":[{"login":"faho","id":5185367,"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}],"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4","html_url":"https://github.com/fish-shell/fish-shell/milestone/4","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4/labels","id":130257,"number":4,"title":"fish-future","description":"These are issues that are not targeted for an upcoming minor or major release. After a release, we will re-examine these issues and pull any in that we think are good targets; that is retarget them to the next minor (or major) release.\r\n\r\nIf you can provide a fix for an issue in this milestone, we'll generally accept it for the next release even if the issue is not targeted for the release.","creator":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars3.githubusercontent.com/u/920838?v=4","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"open_issues":384,"closed_issues":9,"state":"open","created_at":"2012-06-11T02:25:13Z","updated_at":"2017-08-10T14:23:42Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2017-07-01T18:21:21Z","updated_at":"2017-08-10T21:58:52Z","closed_at":null,"body":"The next version of clang will ship with a `--autocomplete` flag that provides a backend for shells to complete all flags that the current clang binary supports. The general idea is that the shell passes the flag it currently wants to complete to clang via`clang --autocomplete=-fsyntax` and then clang prints a list of flags that this completes to:\r\n\r\n```js\r\n$./bin/clang --autocomplete=-std\r\n-std-default= -std: -std= -stdlib=\r\n```\r\n\r\nThis also works with all the values that the flags take, e.g. in this case return all the stdlibs clang supports in its `-stdlib=libc++` flag:\r\n\r\n```js\r\n$ ./bin/clang --autocomplete=-stdlib=,\r\nlibc++ libstdc++ platform\r\n```\r\n\r\nFor a better overview, see the clang's bash completion script that illustrates the way the `--autocomplete` flag works: [bash-completions.sh](https://github.com/llvm-mirror/clang/blob/master/utils/bash-autocomplete.sh).\r\n\r\nThe big advantage is that this allows to have a single shell completion that works with all flags of all future clang versions (even the custom vendor versions from Apple or a self-build clang from trunk!), as the flag just queries the internal option parsing logic of the selected clang binary. \r\n\r\nIt would be very useful if fish would use this feature and also start calling this flag when trying to complete a clang flag.\r\n"},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/321684860","html_url":"https://github.com/fish-shell/fish-shell/issues/4174#issuecomment-321684860","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/4174","id":321684860,"user":{"login":"faho","id":5185367,"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":"2017-08-10T21:58:52Z","updated_at":"2017-08-10T21:58:52Z","body":">We added support for flag descriptions in the format fish wants (separated by \\t) and moved to newlines as separators. \r\n\r\nNice!\r\n\r\n>The ,'s between the values however stayed, sorry :).\r\n\r\nThere's probably a reason for them that I don't get. Anyway, we can deal with that."}}
{"actor":{"display_login":"faho"}}