{"id":13815689,"url":"https://github.com/Valodim/zsh-capture-completion","last_synced_at":"2025-05-15T09:33:14.116Z","repository":{"id":10971060,"uuid":"13287062","full_name":"Valodim/zsh-capture-completion","owner":"Valodim","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-13T07:31:49.000Z","size":205,"stargazers_count":86,"open_issues_count":4,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-16T07:44:38.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Valodim.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-03T00:48:58.000Z","updated_at":"2024-09-24T21:00:52.000Z","dependencies_parsed_at":"2024-08-04T04:08:41.425Z","dependency_job_id":null,"html_url":"https://github.com/Valodim/zsh-capture-completion","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valodim%2Fzsh-capture-completion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valodim%2Fzsh-capture-completion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valodim%2Fzsh-capture-completion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valodim%2Fzsh-capture-completion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Valodim","download_url":"https://codeload.github.com/Valodim/zsh-capture-completion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225342815,"owners_count":17459480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T04:03:53.535Z","updated_at":"2024-11-19T11:30:53.984Z","avatar_url":"https://github.com/Valodim.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# zsh-capture-completion\n\nThis is a proof of concept script for capturing completion matches generated by\nthe zshcompsys completion system. Because of the very complicated nature of\nzsh's completions, this can (to my knowledge) not be done in a straightforward\nway, and this script is accordingly hacky.\n\n\n## Method\n\nRoughly, a pseudo-interactive zsh session is spawned using zpty, and a buffer\nstring plus a tab character is sent so the complete-word widget is executed. To\ncapture the hits, the compadd function is selectivly overridden in an\ninline-sourced file, capturing matches by injecting a parameter to the original\ncompadd call and outputting matches to stdout.\n\n\n## Usage\n\nUsage:\n\n    capture.zsh bufferstring\n\nExamples:\n\n    capture.zsh 'vim -'\n    capture.zsh 'vim --'\n    capture.zsh 'vim --r'\n    capture.zsh 'echo *('\n    capture.zsh 'scp hostname:'\n\nFor an application of ths technique, check out\n[vim-zsh-completion](https://github.com/Valodim/vim-zsh-completion).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FValodim%2Fzsh-capture-completion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FValodim%2Fzsh-capture-completion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FValodim%2Fzsh-capture-completion/lists"}