{"id":16528667,"url":"https://github.com/zetlen/zsh-completion-generators","last_synced_at":"2025-03-03T06:24:44.427Z","repository":{"id":169469371,"uuid":"626611971","full_name":"zetlen/zsh-completion-generators","owner":"zetlen","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-17T13:59:02.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-17T14:42:16.253Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zetlen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-04-11T20:21:30.000Z","updated_at":"2025-02-17T13:59:06.000Z","dependencies_parsed_at":"2024-06-09T02:40:24.873Z","dependency_job_id":"ed33ac09-e1ff-4d96-8f8b-0fb32a7122e1","html_url":"https://github.com/zetlen/zsh-completion-generators","commit_stats":null,"previous_names":["zetlen/zsh-completion-generators"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fzsh-completion-generators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fzsh-completion-generators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fzsh-completion-generators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zetlen%2Fzsh-completion-generators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zetlen","download_url":"https://codeload.github.com/zetlen/zsh-completion-generators/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241618160,"owners_count":19991809,"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-10-11T17:41:09.872Z","updated_at":"2025-03-03T06:24:44.396Z","avatar_url":"https://github.com/zetlen.png","language":"Shell","funding_links":[],"categories":["Other Resources"],"sub_categories":["ZSH Tools"],"readme":"# zsh-completion-generators\n\nProblem: You have a new CLI tool `foo`, and it has a subcommand like `foo generate-completions --shell=zsh`. But you don't know where to put its output--or you _think_ you know, but it doesn't seem to work.\n\nThis is a very simple ZSH plugin which has a table of tool names and the commands for outputting completion scripts for those tools. Currently known tools are:\n\n\u003c!-- inject-markdown start --\u003e\n| Tool | Command to generate completion |\n| --- | --- |\n| `bw` | `bw completion --shell zsh` |\n| `cargo` | `rustup completions zsh cargo` |\n| `deno` | `deno completions zsh` |\n| `docker` | `docker completion zsh` |\n| `fly` | `fly completion zsh` |\n| `gh` | `gh completion --shell zsh` |\n| `hugo` | `hugo completion zsh` |\n| `mise` | `mise completion zsh` |\n| `pnpm` | `pnpm completion zsh` |\n| `rbw` | `rbw gen-completions zsh` |\n| `rustup` | `rustup completions zsh rustup` |\n| `starship` | `starship completions zsh` |\n| `zellij` | `zellij setup --generate-completion zsh` |\n\u003c!-- inject-markdown end --\u003e\n\nOn every shell load, it will filter that list for tools that\n- you have installed (i.e. are on the `$PATH`)\n- do not already have completions registered\n- this plugin has not already generated completions for\n\nIt will run the completion command and save its output to a file `_\u003ctoolname\u003e`. If the path of this repo is in `$fpath` _(see below)_, then completions should work immediately.\n\n## Installation\n\nThis repo follows a zsh plugin convention established by oh-my-zsh. Most other plugin managers expect the same structure. Add `zetlen/zsh-completion-generators` using your chosen plugin manager's instructions. It will autoload the plugin, and put the plugin directory (and thus all generated completions) in the `fpath` variable, where zsh completions directories are listed.\n\n### Manual installation\n\n1. Clone this repo\n2. Add to your `.zshrc`:\n   ```sh\n   export fpath=(/path/to/zsh-completion-generators/ $fpath)\n   source /path/to/zsh-completion-generators/zsh-completion-generators.plugin.zsh\n   compinit # this may already be called elsewhere\n   ```\n\n:warning: You'll need to source this plugin _before_ calling `compinit`, so your favorite plugin manager may have special instructions for doing so.\n\nInitial load of your first new shell after install may take a while, since it has to generate the completion files for each command that you have installed. However, it caches them, so subsequent loads will take no time.\n\n## Notes\n\nIf you upgrade one of these tools and its completions change, this plugin won't know about it by default. The alias `zsh-completion-generators-rebuild` will manually delete all the generated completion files, and they will be regenerated on the next new shell.\n\nAfter changing any CLI completions, you'll always benefit from deleting `$HOME/.zcompdump` and/or `$HOME/.zcompcache/` before starting your first new shell.\n\nSome CLIs don't have `completion` commands that output shell scripts to stdout. Sometimes they want to automatically update your `.zshrc`, or place special configuration files elsewhere. **This plugin is not compatible with those approaches**.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetlen%2Fzsh-completion-generators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzetlen%2Fzsh-completion-generators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzetlen%2Fzsh-completion-generators/lists"}