Skip to content

Conversation

@wintermi
Copy link
Contributor

@wintermi wintermi commented Jan 2, 2023

  • 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
Copy link
Contributor Author

wintermi commented Jan 4, 2023

Screenshot when performing a tab completion on g install command.

g-install-tab-completion

Copy link
Owner

@stefanmaric stefanmaric left a comment

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.

# Completing list of Remote Versions
__remoteVersions() {
declare -a remote_versions_cmd
remote_versions_cmd=( $(cat "$HOME/.cache/zsh-golang/go_versions") )
Copy link
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
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