Skip to content

feat: add 'zsh' tab completion#30

Open
wintermi wants to merge 1 commit into
stefanmaric:nextfrom
wintermi:next
Open

feat: add 'zsh' tab completion#30
wintermi wants to merge 1 commit into
stefanmaric:nextfrom
wintermi:next

Conversation

@wintermi

@wintermi wintermi commented Jan 2, 2023

Copy link
Copy Markdown
Contributor
  • Add zsh tab completion, providing:
    • Command selection
    • Installed Go version list selection
    • Remote Go version list selection

I created it as part of this zsh plugin - https://github.com/wintermi/zsh-golang

@wintermi

wintermi commented Jan 4, 2023

Copy link
Copy Markdown
Contributor Author

Screenshot when performing a tab completion on g install command.

g-install-tab-completion

@stefanmaric stefanmaric left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wintermi thanks for your interest and contribution.

I won't be merging this right ahead because I want to 1) have feature parity with fish and bash for all releases and 3) to sort how to embed this into g itself and its relationship with g-install as mentioned in the README TO-DO.

But definitely your contribution is very welcome specially taking into account that zsh's completion systems are quite complex.

Comment thread completion/_g
# Completing list of Remote Versions
__remoteVersions() {
declare -a remote_versions_cmd
remote_versions_cmd=( $(cat "$HOME/.cache/zsh-golang/go_versions") )

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not from g.

zsh has a cache policy feature in its completion system. Let's try to use that instead and call g list-all

@stefanmaric stefanmaric force-pushed the next branch 18 times, most recently from ea12d81 to 592758a Compare July 10, 2023 18:11
@stefanmaric stefanmaric force-pushed the next branch 3 times, most recently from 3bb6509 to 5127f80 Compare May 26, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants