{"id":28470924,"url":"https://github.com/emptyless/go-get-zsh-autocomplete","last_synced_at":"2026-03-09T05:32:47.062Z","repository":{"id":296716694,"uuid":"979570322","full_name":"Emptyless/go-get-zsh-autocomplete","owner":"Emptyless","description":"'go get' zsh command completion based on already locally fetched packages in the GOMODCACHE and git ls-remote versions","archived":false,"fork":false,"pushed_at":"2025-06-01T15:22:46.000Z","size":7,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-19T11:41:59.815Z","etag":null,"topics":["autocomplete","go","golang","zsh"],"latest_commit_sha":null,"homepage":"","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/Emptyless.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,"zenodo":null}},"created_at":"2025-05-07T18:08:50.000Z","updated_at":"2025-06-02T15:26:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"0e8bec3d-90bc-4565-86ea-124d3be25ba4","html_url":"https://github.com/Emptyless/go-get-zsh-autocomplete","commit_stats":null,"previous_names":["emptyless/go-get-zsh-autocomplete"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Emptyless/go-get-zsh-autocomplete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fgo-get-zsh-autocomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fgo-get-zsh-autocomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fgo-get-zsh-autocomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fgo-get-zsh-autocomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emptyless","download_url":"https://codeload.github.com/Emptyless/go-get-zsh-autocomplete/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emptyless%2Fgo-get-zsh-autocomplete/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30283918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["autocomplete","go","golang","zsh"],"created_at":"2025-06-07T10:07:01.065Z","updated_at":"2026-03-09T05:32:46.192Z","avatar_url":"https://github.com/Emptyless.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 'go get' zsh autocompletions\n\nInspired by [spf13/cobra completions](https://github.com/spf13/cobra/blob/main/site/content/completions/_index.md), this\nrepo reproduces similar autocompletions for the 'go get' command based on already locally fetched\npackages in the `GOMODCACHE` and uses `git ls-remote` to fetch possible versions for those packages.\n\n\u003e No issues were found during local development and or local usage but your mileage may vary. The author(s) are not responsible \n  for any issues that you may encounter or results thereof when using resources from this repository. Usage is 100%\n  at own risk. Submit issues to the Github issue tracker if found.\n\n## Getting Started\n\nEnsure that `Z Shell` (zsh) and Go are installed, e.g. on linux with apt:\n\n```\napt install zsh\napt install golang\n```\n\nOr on Mac with (using [Brew](https://brew.sh)):\n\n```\nbrew install zsh\nbrew install go\n```\n\nCommpletions are based on the `GOMODCACHE` location, if `go` was just installed, verify this location\nusing `go env GOMODCACHE`\n\nTo use ZSH autocompletions, the autocompletion system must have been initialized. If not, ensure that the\nfollowing is part of your `~/.zshrc`\n```\nautoload -Uz compinit\ncompinit\n```\n\nInstall the completions using 1 of 2 methods:\n\n\n1) by appending the file to some `$fpath`, e.g. in `~/.zshrc`:\n\n```\ngit clone https://github.com/Emptyless/go-zsh-autocomplete\necho \"\" \u003e\u003e ~/.zshrc\ncat go-zsh-autocomplete/_go-zsh-autocomplete.zsh \u003e\u003e ~/.zshrc\n```\n\n2) by referencing the _go-zsh-autocomplete.zsh file\n\n```\ngit clone https://github.com/Emptyless/go-zsh-autocomplete\necho \"\" \u003e\u003e ~/.zshrc\necho -n \"source \" \u003e\u003e ~/.zshrc\npwd | tr -d '\\n' \u003e\u003e ~/.zshrc\necho \"go-zsh-autocomplete/_go-zsh-autocomplete.zsh\" \u003e\u003e ~/.zshrc\necho \"\" \u003e\u003e ~/.zshrc\n```\n\nSource the zshrc:\n\n```\nsource ~/.zshrc\n```\n\nAnd now for any package that is in the GOMODCACHE (see `go env GOMODCACHE`), autocompletion is enabled:\n\n```\ngo get github\u003ctab\u003e\n```\n\nwill display all locally cached Github packages. For some \u003cuser\u003e and \u003crepo\u003e, fetch the tags and branches using:\n\n```\ngo get github.com/\u003cuser\u003e/\u003crepo\u003e@\u003ctab\u003e\n```\n\nwhich will display all possible branches and tags to use for `go get`\n\n## Oh My ZSH\n\nWhen using [Oh My Zsh](https://ohmyz.sh), there is a recommended location to store completions:\n\n```\ngit clone github.com/Emptyless/go-zsh-autocomplete\necho '#!/bin/sh\\n' \u003e ~/.oh-my-zsh/completions/_go-zsh-autocomplete.zsh\ncat ./go-zsh-autocomplete/_go-zsh-autocomplete.zsh \u003e\u003e ~/.oh-my-zsh/completions/_go-zsh-autocomplete.zsh\nchmod +x ~/.oh-my-zsh/completions/_go-zsh-autocomplete.zsh\n```\n\n## Debugging\n\nEnsure that the `$ZSH_GO_COMP_DEBUG_FILE` variable is set to some filepath, e.g.\n\n```\nexport ZSH_GO_COMP_DEBUG_FILE=debug.txt\ngo get github.com/\u003ctab\u003e\n```\n\n## Development\n\nAdd the zsh shebang before development and set the debug variable\n\n```\n#!/bin/zsh\nexport ZSH_GO_COMP_DEBUG_FILE=debug.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptyless%2Fgo-get-zsh-autocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femptyless%2Fgo-get-zsh-autocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femptyless%2Fgo-get-zsh-autocomplete/lists"}