Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add 'zsh' tab completion #30

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open

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

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.

None yet

2 participants